Oracle中事务锁(锁住的表、锁住的会话)
Oracle中事务锁(锁住的表、锁住的会话)今天又学会一招,查看Oracle数据库中由于会话非正常退出而导致的事务锁:1.查看锁住的表SELECT b.owner,b.object_name,a.session_id,a.locked_modeFROM v$locked_object a ,dba_objects bWHERE b.object_id = a.object_id;2.查看被锁住的会话SELECT b.username,b.sid,b.serial#,logon_timeFROM v$locked_object a,v$session bWHERE a.session_id = b.sid order by b.logon_time;3.如果要断开某个会话,执行Alter system kill session ‘sid,serial#’www.zzzyk.com