I Escaped from a SQL Server Service Pack Nightmare

I hope you take backups or have a recovery plan in place before a SQL Server service pack upgrade,  if not you might want to reconsider. Initially I wasn’t going to capture the screen shots during this recovery because my focus was to fix the issue but I thought I would just in case others experience the same thing.

I wanted to move from SQL Server 2014 SP1 to SP2, as you can see I had a clear issue.

servicepackerror

If you navigate to the following directory location: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\

This is where you will have all the information you need for troubleshooting (see below screen shot).

directory

For the first step, I usually check the report just to confirm that all pre-reqs had passed. This is called SystemConfigurationCheck_report.

systemcheck

Now is the time to start working through the error logs. The first one I usually go to is the summary file:

patcherror

It is not that detailed so based on the time-stamp highlighted above I go looking at a detailed one. For this example it is called SQLServer_ERRORLOG_2017-03-31T10.17.57

coffee

Look at that message (highlighted). I have to restore or rebuild the master database due to this service pack failure? Well guess what, I don’t have a master database backup and I don’t really want to rebuild the master database.

cm

I try to start the service but it fails. (I was desperate ok!)

Script level upgrade for database ‘master’ failed because upgrade step ‘msdb110_upgrade.sql’ encountered error 5846, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the ‘master’ database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.

To be honest, rebuilding master would be my last option.

I did the following to bypass upgrade mode ( /T902).

t902

I knew from the error log what script screwed up.

I then connected to the instance and ran the ‘msdb110_upgrade.sql’ which is found in the INSTALL folder.

Msg 5846, Level 16, State 1, Line 78

Common language runtime (CLR) execution is not supported under lightweight pooling. Disable one of two options: “clr enabled” or “lightweight pooling”.

Look at the failure message, who set that then?

WHAT

I turn these settings off and go through the installer for the service pack again.

PACK

Well it worked this time.

WORKED

Everything feels cleaner and I am much happier – probably because I didn’t have to rebuild the master database  oh and I turned those settings off!

2 thoughts on “I Escaped from a SQL Server Service Pack Nightmare

    • I know right! It was actually the same server that I ran the first responder kit on for the last blog post, I just forgot to turn them off when I started the SP, I still havent fixed everything 😉

      Like

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