使用master 下的sysprocesses 查询 db正在使用的spid 如
1. 查询哪个用户链接在连接数据库
use 数据库名
select spid from sysprocesses where dbid=DB_ID('数据库名')、
2.杀掉对应的进程
exec(‘kill xx')
3.把数据库设置成多用户
alter database 数据库名 set MULTI_USER
使用master 下的sysprocesses 查询 db正在使用的spid 如
1. 查询哪个用户链接在连接数据库
use 数据库名
select spid from sysprocesses where dbid=DB_ID('数据库名')、
2.杀掉对应的进程
exec(‘kill xx')
3.把数据库设置成多用户
alter database 数据库名 set MULTI_USER