Search

Showing posts with label Database is in transition. Show all posts
Showing posts with label Database is in transition. Show all posts

Monday, September 3, 2012

Database is in transition

When you alter the database to “OFFLINE” and other transactions are happening on that database then the database will be in transition and will require the transition Session to complete, or we may have to kill that session. Database OFFLINE state requires “Exclusive Lock” on the database. So always use “With Rollback Immediate” 

Alter Database <DB> Set Offline With Rollback Immediate;

Friday, April 13, 2012

Database is in transition

Today I had detached a database in SQL SERVER USING sp_detach. 
The operation should have been pretty instant, but after a few minutes I realised something was up.


The database was stuck 'in transition', or so it appeared to Management Studio. I contemplated what to do. I wanted to avoid restarting the service and leaving the db in an inconsistent state, and hence googled the following...


Error 952 Database is in Transition 


As it happens, the database isn't stuck at all, it's just Management Studio thinks it is.
solution. RESTART MANAGEMENT STUDIO.