死锁语句
select
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type='OBJECT'
--kill 80
SELECT blocking_session_id, wait_duration_ms, session_id FROM sys.dm_os_waiting_tasks
SELECT * FROM Orders WITH (NOLOCK) WHERE OrderID=10248
-------------------------------------------------------------------------------------------
ORACLE
select t1.sid, t1.* from v$session t1, v$locked_object t2 where t1.sid = t2.SESSION_ID;
alter system kill session '16,17650';