SQL Server service fails to start after Service Pack installed
Yesterday hit the situation when SQL Server service wouldn’t start after installation of GDR 1617 for SQL Server 2008 R2 (RTM). In case you wonder about what the heck GDR is (I did!), here and here.
One of the error messages in Windows Application Log pointing to the master database corruption, suggesting its rebuild.
It’s one of those classic cases when error message gives you solution hints, which are totally wrong. Well, following the path of uninstalling the service pack, rebuilding the master database with its subsequent restore from backup will do it, but… The real problem cause is totally different from what is suggested by this error message, so is the right solution – it’s all about changing couple of registry keys values.
Note: The same situation is possible to occur after ANY service pack installation, not just this specific GDR one.
It happens because during the upgrade process, a temporary database is created,
then a script runs against msdb database, you would think – according to the script’s file name: sqlagent100_msdb_upgrade.sql
and, as a result, the final error says master database is corrupted and needs to be rebuilt. Very logically consistent, I know. And this, once again, can happen after ANY service pack installation because this is the “shared” behavior. I’d rather say A FEATURE.
Don’t fall into this trap of uninstalling the SP, rebuilding the master db and then restoring it from the latest backup.
Instead, just check two registry keys values and change then accordingly:
That does it. Now you can start the SQL Server service, no need to change any startup parameters. It will start as usual.
The problem’s solved.



