Database "In Recovery"

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace

Database "In Recovery"

Postby JimCarnicelli » Mon Jul 18, 2011 2:11 pm

In all my years of working with Sql Server and the SSMS I've never seen a database listed as "In Recovery". Since installing SQL Source Control a week or so ago, I've now seen it twice.

"In Recovery" appears to be a mode that SQL Server puts a database catalog into when it was incorrectly shut down due to, say, a sudden power loss. The ACID nature of Sql Server guarantees that transactions either wholly succeed or wholly fail. So if the server crashes during a transaction, it is necessary on starting it back up to either complete or roll back any transactions that were previously in operation. It's fairly amazing how durable (the D in ACID) this process is.

So far, I don't see any corruption of my small test database as a result of this, but I am concerned at the thought that SQL Source Control could somehow trigger this. Has anyone else experienced this before?

Some particulars of my situation. I am running a MacBook Pro with Parallels, a virtual machine program hosting a Windows 7 Home Premium VM, on which I'm running SQL Server Express 2008 and SQL Server Management Studio 2008. This most recent time I did a full, ordinary shut-down of my VM Friday and Monday morning did a regular start-up, manually starting the SQL Server service manually and launching into SSMS moments later. There is no other program connecting to this instance of SQL Server currently. And there is only one (user) catalog installed on it for now.
JimCarnicelli
 
Posts: 2
Joined: Mon Jul 18, 2011 1:55 pm
Location: United States

Postby james.billings » Wed Jul 20, 2011 4:52 pm

Thanks for your post.

I've not heard of this problem occurring before in relation to SQL Source Control, and I'm not really sure how it would occur. We perform queries against the database to poll for changes (these are only reading information), and of course if you "Get Latest" changes from your source control system down into your database, this would write data.

It's worth you checking through your SQL Server ErrorLog for possible causes. If you're not performing any restore operations on the database then it sounds like it's perhaps not being shut down cleanly. Given the VM nature of the environment you have, this could occur if your VM goes to sleep and the host machine is then turned off before any VM snapshotting takes place? Just a guess.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby JimCarnicelli » Wed Jul 20, 2011 4:57 pm

Some good thoughts. To be sure, though, I never saw this prior to installing SQL Source Control a week or so ago, even though I've been running my VM and Sql Server on it for quite some time.

I did recently do a rebuild of the VM, which means there are some additional variables to consider. Thanks for reviewing this.
JimCarnicelli
 
Posts: 2
Joined: Mon Jul 18, 2011 1:55 pm
Location: United States

Postby james.billings » Wed Jul 20, 2011 5:00 pm

No problem - if you get anything in the error log that points to Source Control causing this do let us know, but it's certainly not something we've heard of before. I think it's more likely that any extra processing it's now doing due to SSC being installed has perhaps highlighted another problem.

If you want to get in touch with us directly with further queries, please mail support@red-gate.com with F0050277 in the subject line
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 2

Who is online

Users browsing this forum: No registered users and 1 guest