moving a db | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

moving a db

Hello,
I need to copy a db from one computer with its own instance of SQL server to another computer with its own instance of SQL server. This is an very big db, and I would like to get it over as quickly as possible. I’ve tried DTS before, and that takes forever, and I always get FK constraint violations. I just noticed something about sp_detach_db and sp_attach_db. This seems much quicker and easier. Am I correct in assuming this? If so, how would I do this. I noticed something about usernames also. Do I need to worry about not being able to access this db? Thanks for your help, Ben
attach/detach means taking the database offline. if you can do that it’s fast and simple. otherwise you could backup and restore.
you will need to create login names that does not exist on the destination server and for those that exist run sp_change_users_login to fix the SID.
True, using BACKUP/RESTORE solution it would be faster than compared to ATTACH/DETACH.
Review information listed in this KBAhttp://support.microsoft.com/default.aspx?scid=kb;EN-US;224071 which was referred by Bambola. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>