数据库死锁

select username,lockwait,status,machine,program from v$session where sid in (select session_id from v$locked_object);

 

select sql_text from v$sql where hash_value in (select sql_hash_value from v$session where sid in 

(select session_id from v$locked_object));

 

SELECT s.username,l.OBJECT_ID,l.SESSION_ID,s.SERIAL#,l.ORACLE_USERNAME,l.OS_USER_NAME,l.PROCESS

FROM V$LOCKED_OBJECT l,V$SESSION S WHERE l.SESSION_ID=S.SID;

 

alter system kill session '103,5835'

 

select * from v$locked_object

select * from dba_objects where object_id=91423

select * from v$session where sid=66

select * from v$transaction

你可能感兴趣的:(数据库)