Database 'mssqlsystemresource' is being recovered. Waiting for SQL Server to start

Jonath's Avatar


23 Jun, 2014 10:32 AM

I'm using the SQL Server Express 2012 SP1 service. Which is working well. However I've had to add some extra logic to my 'before build' script because the database isn't quite ready to use when it's started.

The error I sometimes get is:

Exception calling "ExecuteNonQuery" with "0" argument(s): "Database 'mssqlsystemresource' is being recovered. Waiting until recovery is finished."

I've got round this by having some wait/retry logic in a PowerShell script, but would be great if the before build script wasn't fired until after this recovery is complete.

In the meantime the script I'm using is:

  1. Support Staff 1 Posted by Feodor Fitsner on 23 Jun, 2014 05:34 PM

    Feodor Fitsner's Avatar

    Well, I see no issues in your script, theoretically, it should be fine. I think that error is related to SQL Server engine itself. Try adding some delay before running the script to let SQL engine to "warm up".

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:45 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac