Geeks With Blogs
Norman Sayers - Blog give a little, take a lot
| Home |
 
Hi,
 
I found an issue with SQL Server 2005 when I was trying to perform a DR restore on an HP Blade server.
The overview of any SQL rebuild process is to:
 
1. Restore OS & System State
2. Rebuild master database
3. Restore databases
 
SQL Server 2005 does not use the rebuildm.exe command that SQL Server 2000 used for rebuilding the master database. It instead uses the initial setup.exe from the command prompt with options (http://msdn2.microsoft.com/en-us/library/ms144259.aspx
i.e. start /wait <CD or DVD Drive>\setup.exe /qn INSTANCENAME=<InstanceName> REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=<NewStrongPassword>
 
What they don't make clear to you in the articles I have read is that the setup.exe MUST be on the original install path. If the original install was performed from \\server\c$\folder then this path MUST be used for the setup.exe to rebuild the master database. You cannot copy the CD to a local directory, map a drive or anything other than the original install path.
 
It might be possible to change the install path in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer) but from what I found this is much more difficult than a one or two value change and not recommended.
 
I suppose you could do a complete reinstall of SQL Server but you would have to have documented any changes made to the live server if the install options differed from a default selection. I don't think this is very practical in the event of a DR.
 
So, if your doing a SQL Server 2005 install I strongly recommend that you copy the CD's to a local repository and do the install from there. That way the repository will be restored from the OS backup and available for the SQL Server 2005 rebuild if it ever becomes necessary.
 
PS - You can determine the original install path from the SQL logs or the registry.
 
Regards
Norman
 
Posted on Thursday, March 1, 2007 1:36 PM | Back to top


Comments on this post: SQL Server 2005 rebuilding the master database

# re: SQL Server 2005 rebuilding the master database
Requesting Gravatar...
In my DR testing I discovered that my original SQL Server 2005 install.exe was ran from \\server\folder and this \\server was not available in the DR site. I could rebuild this server or temporarily rename another server and make the same folder structure on it, but I decided to add a DNS alias entry for \\server pointing to the DR server I was trying to restore. This allowed me to run the \\server\folder\setup.exe as if it was from the original path but actually it ran from the local server I was trying to rebuild.

Thought this might help someone else out at sometime.

Rgds
Left by Norman on Mar 06, 2007 6:24 AM

# re: SQL Server 2005 rebuilding the master database
Requesting Gravatar...
There is always the old SUBST command to map a drive as a path or a path as a drive. I haven't actually tried it. It should work for the purposes of the install, since its easy to change the drive letter of physical CD/DVD drive.
Left by Jeff B on Apr 10, 2007 5:13 PM

# re: SQL Server 2005 rebuilding the master database
Requesting Gravatar...
When I ran the above command, it didnt throw any error, but no system databases are restored to the data folder. I ran the command many times but the same result. In my case all my system databases were lost.
Left by Kumar on Feb 08, 2009 10:05 PM

Your comment:
 (will show your gravatar)


Copyright © Norman Sayers | Powered by: GeeksWithBlogs.net