Rebuilding System Databases

Sometimes in fishing you really want a do-over. Last weekend I was fishing a lake up in Onieda County for muskies (my favorite!). As we drifted over a shallow finger that extended into deep water, I hooked up with a solid muskie about 10 – 15 feet away from the boat. It appeared out of nowhere, and just grabbed the bait and held it. Not feeling a strong strike, I wasn’t even aware the fish was there until I felt some weight and looked over to see it. Then I made a series of mistakes that cost me a catch. First, I didn’t give a sharp hookset. I put a lot of weight against the fish by pulling hard, but did not drive the hooks in with a sharp tug. The second mistake was made a couple weeks before. I was using the lure, a shallowraider, when I caught my opening-day muskie, and I never re-sharpened the hooks. Due to the hard boney mouth of the muskie, it is incredibly important to keep your hooks razor sharp. Third, I didn’t stay in control of the fish. As he approached the boat straight on, I had nowhere to go. I also became distracted as I could feel him coming up for a jump. The fish leapt out of the water and shook his head viscously. When he landed back in the water, the lure popped out of his mouth and the fish was lost. I got a great look at him and he was definitely around 40 – 41″, a good sized muskie. Losing that fish will continue to gnaw at me until my next encounter with a muskie.
DBA’s can also really want a do-over. As I have been practicing my cutover for the server migration, I have made a lot of mistakes. My last one was to try and restore the Production server’s master database to the new server. This wouldn’t usually be a problem except the drive letters are different on the new server, as is the path of the system databases. By restoring the mater database, I ran into a situation where I was not able to get the service to come all the way back up. My only option is to start over fresh. I’m going to try to rebuild the system database. I use the instructions from Microsoft here.
First I Mount the SQL Server 2008 R2 installation media.
20150529 System Database Rebuild
Next I run this command in an elevanted command prompt.
20150529 System Database Rebuild Cmd
Upon completion there is no message in the command prompt.
20150529 System Database Rebuild Cmd Completed
Lastly, I am able to start the service.
20150529 System Database Rebuild Service Back Up
Use this only in extreme cases or in test environments as it will wipe out all the data in each of the system databases. The last step would be to restore each database from a backup, if possible.

Advertisements

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