debug时,在执行db还没完成的情况下,取消了,后面发现一张表content_kpi查询一直卡住
-- 结果为0
select count(*) from content_kpi with(nolock)
-- 一直卡住,查不了
select count(*) from content_kpi
解决:
表可能被锁住了
-- 结果为59
select
request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type='OBJECT'
-- 干掉这个进程
KILL 59