关闭数据库未关闭的事务

 

declare @did int

select @did=request_session_id from sys.dm_tran_locks where resource_type = 'OBJECT' and resource_database_id =DB_ID('数据库名')
kill @did

posted @ 2019-11-20 15:33  望着天的蜗牛  阅读(325)  评论(0编辑  收藏  举报