Home > General Administration > SQL Server service fails to start after Service Pack installed

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.

Advertisements
  1. Chhavi
    November 22, 2011 at 10:59

    Script level upgrade for database ‘master’ failed because upgrade step ‘sqlagent100_msdb_upgrade.sql’ encountered

    error 15240, state 1, severity 16.

    For above eror number also, solution is perfect.

    Thanks a bunch.

  2. Deependra Singh
    August 28, 2012 at 09:31

    This worked for me.

    Thanks a lot guys for posting such a perfect solution.
    Best Wishes!!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: