1

I can connect to remote SQL Server database and I want to create a local database copy on my system. How can I do it? When i try backup through Management studio I cannot copy backup file on my hard drive only on remote system hard drive. Copy database command also doesn't work because I have express version of SQL Server. And export command doesn't transfer stored procedures, only tables data. Any suggestion?

Does T-SQL BACKUP command can help me? if it does then how to use that command?

I havn't access to remote computer. Only mssql connection.

2 Answers 2

2

If your local drive is accessible by the remote server, you can create your backup directly to your drive. Not to be able to create backups on a network share is just a restriction of the GUI. Use the T-SQL BACKUP command and it will work.

Greets Flo

Sign up to request clarification or add additional context in comments.

7 Comments

well, does that command backup database on MY hard drive? BACKUP DATABASE AdventureWorks2008R2 TO DISK = 'F:\db.bak';
@Neir0: only if the remote server has access to your local harddisk - which is highly unlikely...
@Neir0 Could you describe "remote" more specific, please? Do you mean a remote server in your local area network or anything else?
@Florian Reischl i mean remote server on internet and it hasn't access to my harddrive. So do you know any alternative ways?
@Neir0 so I got you wrong. In this case make a backup (over T-SQL or SSMS). After that, you have to transfer it to a FTP server, over a VPN, or any other protocol.
|
0

You can use the Export tool of the SSMS to copy the tables of your database and use the Generate Scripts tool to get scripts that create procedures, views, triggers and functions of the database and run these scripts on your new database.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.