Omicron Llama

Coding all day, every day.

Rebuild Master Database after failed SQL Server 2008 R2 SP1 upgrade

This is purely for my own reference, but when I upgraded 2008 R2 to SP1 it somehow corrupted my master database.

As this was a dev box, I didn’t have a backup of the master database (and as I’m not a DBA, didn’t know I needed to :P), so I had to rebuild, re-add the Logins for my service accounts then re-attach all my SharePoint databases (damn, there’s quite a few in SharePoint 2010!).

This is the command I had to run to rebuild the master database:

(Note: line breaks added for brevity).

Note that the SqlSysAdminAccounts had to be the SQL Server Service Account. I also had to temporarily add that account to Domain Administrators group on my dev environment to let me run SSMS as that service account, so I could go in and add all my accounts to the server logins, as well as re-attach the databases.

Once I discovered all the ones I needed, my farm came back up in no time!

Leave a Reply

Your email address will not be published. Required fields are marked *