查询连接该库的进程中所否被锁定
select * from master..sysprocesses where blocked>0 and dbid=db_id('数据库名');
kill被锁的spid
exec ('kill spid')