操作数据库还原时如果提示数据库无法独占使用,可以使用下面的方法杀掉进程

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


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

--3、执行杀进程spid
kill 52
原文地址:https://www.cnblogs.com/xmily/p/3699653.html