Neir0
Neir0

Reputation: 13367

Backup SQL Server database

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.

Upvotes: 1

Views: 1692

Answers (2)

Mostafa Elmoghazi
Mostafa Elmoghazi

Reputation: 2154

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.

Upvotes: 0

Florian Reischl
Florian Reischl

Reputation: 3856

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

Upvotes: 2

Related Questions