principlesqlModerate
Attach/detach vs. backup/restore
Viewed 0 times
detachattachrestorebackup
Problem
I need to transfer the database (as a whole) to another server, to make a duplicate database to setup another test environment.
I have two choices:
What are the pros and cons of the two solutions according to my requirements?
I am using SQL Server 2008 Enterprise.
I have two choices:
- Make a full backup at source server/restore at destination server;
- Detach at source server/attach at destination server.
What are the pros and cons of the two solutions according to my requirements?
I am using SQL Server 2008 Enterprise.
Solution
Backup/restore should normally be your method of choice. It will be quicker in most situations.
You can use it consistently, also for production to test too.
See this related question as well, where the backup/restore vs detach/attach is mentioned:
SQL Server Migration restore backup vs copy data and log files
Make sure you add the
You can use it consistently, also for production to test too.
See this related question as well, where the backup/restore vs detach/attach is mentioned:
SQL Server Migration restore backup vs copy data and log files
Make sure you add the
WITH COPY_ONLY option to the backup so it does not break the existing maintenance plan backup chain.Context
StackExchange Database Administrators Q#11177, answer score: 12
Revisions (0)
No revisions yet.