question

Ron 3 avatar image
Ron 3 asked

Detaching/Attaching System and User Databases

So I am moving from a physical server to a VM MS SQL Server 2005 and am planning to detach and attach the databases to the new server. Here are my questions. :-)

Here is the setup:

Existing: MS Server 2003 32-Bit, MSSQL Server 2005 SP3,
New: MS Server 2008 64-Bit, MSSQL Server 2005 SP3,

  1. Should I detach system databases before detaching all of the user databases?
  2. Should I attach the system databases before or after all of the user databases?
  3. Should I export the login's using this information before transferring any databases?

Thank you in advance for all of your help!

sql-server-2005migrationattach
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Fatherjack avatar image
Fatherjack answered

Personally I wouldnt bother about moving system databases, I just use the vanilla ones created on installation. I like to create stuff as its needed on the new server so that anything that isnt required gets left behind - a bit like Spring Cleaning I guess. It may be because I dont have enough controls in place to ensure unused objects get deleted and things get kept too long. You may in a better state than me and want to copy all settings from the server and so moving the system databases would make sense for you.

I also prefer to use Backup/Restore to move a database to a new instance rather than detach/attach. Either is a valid way to move it and by and large its preference over any particular functionality or requirement. To my mind its easier to leave the old server version online until the new version is working just in case its needed as a fall back rather than have to re-attach it first ...

2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

+1 What he said. I'd love to add something, but can't.
1 Like 1 ·
OK, working with a server with the same name could make this a whole new question! You could run into some network confusion issues. As far as SQL is concerned it should be fine so long as you dont need to connect one to the other. I tend to use the offline status for the old server (right click the database in SSMS and choose Tasks | Take offline) to prevent any data changes while the move is in progress.
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.