Sql-server – Migrating system and user databases to a new server by moving the LUN

migrationsansql serversql-server-2008-r2system-databases

I have to replace a server. The system and user databases all reside on the E: drive which is a SAN LUN. The method they want to employ is to remove the LUN from the current server and present it to the new server.

My concerns are that SQL Server is installed on the C: drive which is local storage and will not move with the LUN. I will need to install SQL Server on the new server, and when I do the system databases will be created on the new server.

My questions are:

  • I know the user databases will need to be detached before moving the LUN, but what about detaching master, model, and msdb?

  • Assuming the system databases including master can be detached, after the LUN is associated with the new server, how would you handle the master, model, and msdb files on E: with the LUN?

My thoughts were maybe choosing to install the system dbs on C on the new server and then after the LUN moves associate SQL Server with the location of the system databases on E and delete the ones on C.

I also thought about restoring the master db from a backup. How would you handle this?

This is SQL Server 2008 R2 SP2 10.52.4000 Enterprise non clustered.

Best Answer

You will not be able to detatch system databases. If they are not open to properly migrating the server level objects to another server, then I would opt for restoring system databases over trying to replace them. Ensure you are on the same, exact build number or master will not restore. You will also likely have to update the server name in master, if your new server does not have the same hostname.

I would also insiste on a backup of every user databae before that LUN is moved anywhere. (Just in case.)