Remove SQL Server database from single-user mode

Turn off the single-user mode of the database by the following statement:

ALTER DATABASE [db_name] SET MULTI_USER WITH NO_WAIT

OR

exec sp_dboption 'db_user', 'single user', 'FALSE'
 
If the process is deadlocked, please kill the processed by:
 
select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame
from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid where d.name = 'jasper_db_sit'
go


kill spid


留言

這個網誌中的熱門文章

java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$Parser

10 Tips for Proper Application Logging

Turn off WebLogic basic authentication