Monday, March 12, 2012

How to rebuild/rescover the master database in sql 2005

Hi, I'm testing my recovery on a sql server 2005 database. The server has been restored, which includes the OS and sql server 2005 installation (binaries, full tape restore). The tape restore didn't put back the master.mdf and other .mdf files (can't be backed up when open), so I need to rebuild the master and do a database recovery on it and the other supporting databases (yes, I have database backups). I have installed the sql 2005 setup CDs in a folder and run the following command to rebuild the master, but nothing happens, it pauses for a couple of minutes before it returns to the prompt, but it does not put and new master.mdf files in the folder and I can't start the service in single user mode. "start /wait setup.exe /qn INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=mypassword" Anybody have any procedures for a full sql server 2005 recovery or suggestions on this, please post.

Thanks, Mike

I've tried using the below query and it has rebuilded the master database...........

start /wait <CD or DVD Drive>\setup.exe /qn INSTANCENAME="InstanceName" REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD="NewStrongPassword"

if you have master db backup you can restore it in single user mode as follows,
go to command prompt and type the below command

NET START MSSQLSERVER /c /m then perform the restoration it will work.............

|||

Deepak, did you have a master.mdf to start with? In my test, I have none of the master.mdf and other supporting db files to start with. Then you use the "start /wait setup.exe......" and next the "NET START......." and recover?

Thanks, Mike

|||

Well, almost got it to work. Now if fails and says my password does not meet the password policy, password is to short..... I'm using a 15 character password. Shouldn't this work? Thanks, Mike

|||

Mike,

Pls refer the link, http://deepakinsql.blogspot.com/2007/08/how-to-rebuild-system-database-in-sql.html

I've tried it and its working for me. I've posted it in my blog.....pls check and let me know if it works Smile

Thanxx

Deepak

|||Deepak, I'm out of the office this week, I will take a look at this later. Thanks for the update. Mike

No comments:

Post a Comment