EagleFox
EagleFox

Reputation: 1367

How do I export an SQL Server database to move it to a different server?

I tried to export a database using the wizard in SQL Server Management Studio. It exported all the tables but with no primary keys or identity keys.

I realized I need to save SSIS Package. How do I exactly export a database using SSIS? I am actually on the Save and Run Package but I don't know if I should choose SQL Server or File system.

Is there a nice tutorial on exporting SQL Server database with identity keys and all?

What's happening is, I cannot insert new records on some table that just got exported. I found that Enable identity insert has something to do with it but I am not sure if I should enable them all while exporting.

Upvotes: 0

Views: 165

Answers (1)

user756519
user756519

Reputation:

I assume that you are using Restore Database dialog user interface available on SQL Server Management Studio.

On the Restore Database dialog, click Options page and then check Overwrite the existing database (WITH REPLACE). Click OK to restore the database.

CAUTION:

Selecting WITH REPLACE option will overwrite the database files on the destination server that are using the same name as the database file names in the backup. Read more about WITH REPLACE option on MSDN Restore Database (Options Page) before selecting this option.

WITH_REPLACE

Upvotes: 1

Related Questions