开发者

Moving a SQL Server database to a new server

开发者 https://www.devze.com 2023-01-31 20:33 出处:网络
Whenever I move a SQ开发者_运维知识库L Server database to a new server I always to a database backup and restore. I have seen a lot of people, especially DBA\'s who will to a detach / re-attach of the

Whenever I move a SQ开发者_运维知识库L Server database to a new server I always to a database backup and restore. I have seen a lot of people, especially DBA's who will to a detach / re-attach of the MDF file instead. What is the preferred method and why? I find a backup/restore to be safer, less likely hood of corruption.


I just did this. For our small databases, I did a backup/restore - just because I felt like it was 'safer'. However, when moving LARGE databases, it is so much faster to just detach, copy and attach. This beats having to do a (usually slow) backup, followed by a copy and a (usually slow) restore.

Microsoft recommends using alter database 'planned relocation procedure'.

Note, you can use attach/detach to upgrade between SQL versions as shown in the link.

0

精彩评论

暂无评论...
验证码 换一张
取 消