Sql Server - The log for database 'CRC1' is not available. Check the event log for related error messages.

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.

 

Databases: 

Comments

Quick Solution Made my day..Thanks so much..

simple restart will do trick or taking DB offline to online that will also work... but complete solution is incorrect because it cleraly says that.."Log file for the Database unavalilble"

so you need to check or have to do health check of storage/disk/mountpoints is there any problem or is that some one from OS team or any windows OS has any problem & is that is uptpdate , did anyone have made the registrly level change for the Drives/mountpoints or etc...

or it might be an BUG and required to approach MS case incase if all is good...and no issues reproted. also try to run the DBCC CHECK DB to see any errors persists(ofcourse I have seen there will be no issues).... might be some filter driver which cannot supports or helps for  sparse files on an VM server...

still it is interesting....

Thanks,

Uday

rahul's picture

Hi Rama, thanks for sharing your thoughts.

Cool
It hepled
thanks a lot