2013. július 2., kedd

Stuck in Single user mode with deadlocked

One day I tried to set my DB to single user mode with GUI

GUI

After I couldn't do anything with the DB I always got this message:

Msg 1205, Level 13, State 68, Server XXXXXXXXXXX, Line 1
Transaction (Process ID 53) was deadlocked on lock resources with another proces
s and has been chosen as the deadlock victim. Rerun the transaction.
Msg 5069, Level 16, State 1, Server XXXXXXXXXXX, Line 1
ALTER DATABASE statement failed.  

I tried everything but not helped...... After several hours of searching I found the solution:

USE [database] 
SET DEADLOCK_PRIORITY HIGH
exec sp_dboption '[database] ', 'single user', 'FALSE';
ALTER DATABASE [database]  SET MULTI_USER WITH NO_WAIT
ALTER DATABASE [database]  SET MULTI_USER WITH ROLLBACK IMMEDIATE 








Nincsenek megjegyzések:

Megjegyzés küldése