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


留言

這個網誌中的熱門文章

Disable ionic's sidemenu content drag to toggle menu

Multiple writable mappings exist for the field. Only one may be defined as writable, all others must be specified read-only.

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