Friday, March 23, 2012

Moving system database

What is the correct order:
Should it be:
Master
Model
MSDB
Tempdb
I understand that the model should be before the MSDB database but as for master and tempdb I don't know the order.
Thanks
LystraPersonally, I would use Alter Database on tempdb first using the 'Alter database' statement. Then stop/restart SQL before going on just to follow the practice of 1 change at a time.

Then follow the steps outlined in http://support.microsoft.com/default.aspx?scid=kb;en-us;224071 for moving the others.

Have fun!
OSCI|||What the hell are you guys talking about?|||If you are migrating master to another server, you want the tempdb files to be in place before you restore the master database. If you will be creating new databases, then model should go next because it is your template. msdb will carry across your jobs and DTS packages, but you will have to modify the originating_server column in the sysjobs table if the new server has a different name that the source server.

Also, you could stop sql server, and copy the source master mdf and ldf to the corresponding location on the new server and then start sql server. It does work, because I had to do that this weekend for a large server migration. Just make sure you do the sp_dropsever and sp_addserver to rename the sql server from the old to the new!|||Okay, but does it also apply for moving files from drive c to drive d?

Thanks

Lystra|||Nope, you will have to do a restore with move to have it see the files in another location.|||I've always had good luck with Microsoft's (http://support.microsoft.com/default.aspx?scid=kb;en-us;224071) directions, even though I get the willies just thinking about needing to do it with production systems.

-PatP|||That was what I was going to use, but now I am totally confuse with the RESTORE WITH MOVE.

As for the MS direction when moving the master database the example shows changing from the d drive to the e drive. Not from server to server.

I think know the order to move these databases.

1 tempdb
2 master
3 model
4 msdb|||I've always had good luck with Microsoft's (http://support.microsoft.com/default.aspx?scid=kb;en-us;224071) directions, even though I get the willies just thinking about needing to do it with production systems.

-PatP
Sorry ... my answer was incomplete. For the master database, I would use Microsoft's solution ... it works, I can attest to that.

For the master and model databases, you will have to use the restore with move option to move them from the c to the d drive!|||Why are you doing this?

Just to migrate users and packages?

Why not just do a ground up install?|||The issue is that when SQL Server was installed all of the system tables were installed on the c drive. The c drive is limited with the amount of space, it's on 16 GB, as for the Server Manager he cannot add anymore space to the drive with out having to re-installation of MSWindows and all of the applications that is necessary on this server. (I don't know how true that statement is). So it was decided by the powers that be to move the system tables off of the C drive.

So I am trying to get the best possible way to accomplish this goal.

Thanks

Lystra

No comments:

Post a Comment