查询连接该库的进程中所否被锁定

select * from master..sysprocesses where   blocked>0 and dbid=db_id('数据库名');

kill被锁的spid

exec ('kill spid')

 

posted on 2009-03-15 16:19  Dot-Boy  阅读(547)  评论(0编辑  收藏  举报