This week 2-3 days back, I got a really strange Sql Server error when browsing to one of my ASP.NET applications in the brower on my development server. As soon as I opened the app, the following error greeted me: M8ZWJBN5J8RV

 

 

The log for database 'CRC1' is not available. Check the event log for related error messages. Resolve any errors and restart the database.

 

I was in a real hurry as I needed to complete a task quickly. After a brief moment of being dumb-struck, I switched to a developer’s best friend (no prizes for guessing this one, Google off-course). The first search result took me to a Microsoft Knowledge Base article listing a hotfix being available to resolve the problem. No thanks, I said to myself. I need a quick and easy solution and have no time to play around with hot-fixes.

Other search results suggested a DBCC check, which I indeed performed and it came up with some error for the database (can’t recall what exactly was the error DBCC reported). I got still more suggestions in the search results on the possible cause and potential resolutions to the issue which I all skimmed through before stumbling across to TJay’s blog post on the same issue.

After giving quite an introduction to his situation and the steps he followed to resolve it, he presented a pretty quick and ingenious solution, to take the database offline in Management Studio and bring it back online (right-click any database in Management Studio, and you should have an option saying “Take Offline”. Once you click it, you are not allowed to do anything else with the database except right-click it again and bring it back online by selecting “Bring Online” option from the context menu).

As soon as I did that, viola my database was fine. I still do not know (nor I have researched about it) on what exactly taking offline/online does to a database in Sql Server. But hey, the solution worked and worked petty well.

In hind-sight, I think another option I could have tried was to re-start the Sql Server itself. Not sure if that would have worked, but it was worth a try.