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!

more ▼

asked Apr 28, 2010 at 09:59 AM in Default

avatar image

Ron 3
97 5 5 9

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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 ...

more ▼

answered Apr 28, 2010 at 10:16 AM

avatar image

Fatherjack ♦♦
43.8k 79 101 118

  • What he said. I'd love to add something, but can't.

Apr 28, 2010 at 10:23 AM Grant Fritchey ♦♦

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.

Apr 28, 2010 at 10:49 AM Fatherjack ♦♦
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Apr 28, 2010 at 09:59 AM

Seen: 1362 times

Last Updated: Apr 28, 2010 at 09:59 AM

Copyright 2018 Redgate Software. Privacy Policy