setup.exe is not rebuilding master db during disaster recovery test

  • I'm testing disaster recovery, and I'm trying to rebuild the master database using setup.exe as described in books online:

    start /wait setup.exe /qn INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=

    I have attempted this on three different systems without success. The last system was a fresh install of Windows 2003 Server, and SQL 2005 standard edition, with no service packs. I installed from the DVD, and then immediately tried the above command directly from the DVD as well.

    The datestamp on the system databases does not ever change, and if I stop SQL and move all of the system databases (simulating a bare-metal restore, where the OS files have been recovered, but locked database files have NOT been), they never get replaced as I would expect.

    The summary.txt in \Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt claims the operation was successful:

    Setup succeeded with the installation, inspect the log file completely for status on all the components.

    The SQLSetup....Core.log in the \Microsoft SQL Server\90\Setup Bootstrap\LOG\Files folder contains one error:

    Running: LaunchLocalBootstrapAction at: 2008/9/2 12:45:23

    Error: Action "LaunchLocalBootstrapAction" threw an exception during execution. Error information reported during run:

    "C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\setup.exe" finished and returned: 0

    Aborting queue processing as nested installer has completed

    Message pump returning: 0

    Is there a better way to rebuild? At this point, my only option is to stop SQL on all my production servers and make a copy of the system databases just so I can ensure recovery will actually work.

    --David

  • Can you please specify a full command as you are submitting it?

    Are you running a default instance?

  • Thank you for asking for the exact command! I started typing it out, and only then did I see what I've been blind to for the past day and a half--I had the instance name wrong. "D'oh" doesn't quite cover it. Anyhoo, it's happily rebuilding now.

    However, for anyone else running into this question, here's the exact sequence that works for a default instance:

    cd to the exact path you originally installed SQL from, then type:

    start /wait setup.exe /qb INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=

    I use /qb instead of /qn so you can see progress and any major errors.

    The main problem I ran into with my first two tests (different, existing servers) was that I did not have the original install location still (installed from network, location ceased to exist). If you run into that, this KB article may help:

    Or you can try adding the parameter:

    REINSTALLMODE=vomus

    Which is supposed to attempt to install from the current location, disregarding the paths in the registry.

    Good luck with either--I never got that working, which is why I moved to a scratch install where I knew the install media location was correct.

    Now that I have the proof of concept down, I'll go back and work on a real-world scenario.

    Glen, thanks again. Classic case of a second set of eyes--albeit remote, in this case.

    --David

  • Glad you figure it out! 🙂

    /qb versus /qn was in the list of my next suggestions. That is a great tool for debugging.

  • One more note--even when it ran correctly, I still saw the "error" in the 90\Setup_Bootstrap\Log\Files\SQLSetup..._Core.log file. Just for future reference.

    When it did run correctly, there was a new log file named SQLSetup...SQL.log--in previous runs with the incorrect instance name, that file never got created, so that might be a useful troubleshooting indicator.

  • It is not an error. It is an entry in a log file. When the code of error is different from 0, then it is an error.

  • I am trying to rebuild the master in order to change the collation. I keep getting the message:

    "please go to the control panel to install and configure system components"

    I am using the command:

    start /wait setup.exe /qb INSTANCENAME=PASKIET2005DEV REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=myPassword /SqlCollation=Latin1_General_CS_AS

    Please help me figure out why I cannot do this! I am on a sctrict deadline to fix this issue and am trying not to have to reload the server.

    Kindest Regards,
    David

    ** Obstacles are those frightening things that appear when we take our eyes off the goal. **

  • David,

    Two starting points:

    http://social.technet.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/c007c020-46f2-484a-877b-c344b94a2b9e/

    and

    http://www.tek-tips.com/viewthread.cfm?qid=1133389&page=9

    I'm still amazed that MS decided to package this functionality in setup.exe, with all of the complications that that entails. That's the last thing you need to deal with when you want to rebuild master.

    One additional option: on a different server, install the same exact build of SQL, up to the same exact service pack, stop SQL, copy the system databases out, and replace the ones on your original server with those copies, and start SQL on your original server--then you should at least be able to run a restore from a previous backup. Crude, but effective. Part of my disaster recovery plan now involves a copy of system databases made this way, for this exact contingency.

    --David

  • the other trick to recover from a dead master database is to take a backup of the master and restore it to a different sql instance as another name (i.e. NEWDB). Once the database has been restored then detach it and rename the disk files from NEWDB.mdf and NEWDB.ldf to master.mdf and mastlog.ldf

    Copy these files to the corrupt sql instance and replace the original corrupt files. The SQL instance will now start and no messing with database rebuilds either 😉

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply