SQL Server 2008 R2 Stuck in Single User Mode

后端 未结 5 2013
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 10:24

Having executed a DB deploy (from a VS SQL Server database project) on a local database, which failed, the database has been left in a state where it has single user mode left o

5条回答
  •  走了就别回头了
    2021-01-30 11:01

    This was answered here, the code is:

    use master
    ALTER DATABASE YourDatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE 
    
    --do you stuff here 
    
    ALTER DATABASE YourDatabase SET MULTI_USER
    

提交回复
热议问题