操做数据库还原时若是提示数据库没法独占使用,可使用下面的方法杀掉进程

--一、查找数据的dbid
Select * from master..sysdatabases where name = 'testeq'


--二、查找对应dbid的进程ID
Select * from sys.sysprocesses a where a.dbid = '32'

--三、执行杀进程spid
kill 52
相关文章
相关标签/搜索