SQL死锁问题
连接当前所持有的锁sp_lock
–sys.dm_tran_locks系统动态管理试图与其他动态管理视图,直接查出某个数据库上面的锁是在哪些表格,以及哪些索引上面select request_session_id,resource_type,resource_associated_entity_id,request_status,request_mode,resource_description,p.object_id, object_name(p.object_id) AS object_name,p.*from sys.dm_tran_locks left join sys.partitions p On sys.dm_tran_locks.resource_associated_entity_id=p.hobt_idwhere resource_database_id=DB_ID(‘SSISDB’) order by request_session_id,resource_type,resource_associated_entity_id