甲骨文中有哪些锁处理方式

  介绍

本篇文章为大家展示了甲骨文中有哪些锁处理方式,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

<强> 1,查询锁情况

select  sid,连环#,事件,BLOCKING_SESSION 得到v $ session  where  event  like  & # 39; % TX % & # 39;;

<强> 2,根据sid查询具体信息(可忽略)

select  sid,序列号,用户名、机、BLOCKING_SESSION 得到v $ session  where  sid=& lt; SID>;

<强> 3,杀掉会话

#根据1和2中查到的sid和串行#定位会话,并杀掉

ALTER  SYSTEM  DISCONNECT  session  & # 39; & lt; SID> & lt; SERIAL> & # 39;,立即;

ALTER  SYSTEM  KILL  session  & # 39; & lt; SID> & lt; SERIAL> & # 39;;

,附件:

#查询阻塞脚本

col  waiting_session  for 样子   col  lock_type  for  a15   col  mode_requested  for  a10   col  mode_held  for  a10   col  lock_id1  for  a10   col  lock_id2  for  a10   set  linesize  120年   set  pagesize  999年   with  dba_locks_cust  as    (SELECT , inst_id | | & # 39; _ # 39; | | sid  session_id,   ,,,,,DECODE (类型,   ,,,,,,,,,& # 39;先生,,,& # 39;Media 恢复# 39;   ,,,,,,,,,& # 39;rt # 39;,, & # 39; Redo 螺纹# 39;   ,,,,,,,,,& # 39;联合国# 39;,,& # 39;User 名字# 39;   ,,,,,,,,,& # 39;tx # 39;,, & # 39;事务# 39;   ,,,,,,,,,& # 39;tm # 39;,, & # 39; dml # 39;   ,,,,,,,,,& # 39;ul # 39;,, & # 39; PL/SQL  User 锁# 39;   ,,,,,,,,,& # 39;dx # 39;,, & # 39; Distributed  Xaction& # 39;   ,,,,,,,,,& # 39;cf # 39;,, & # 39; Control 文件# 39;   ,,,,,,,,,& # 39;如果# 39;,,& # 39;Instance 国家# 39;   ,,,,,,,,,& # 39;fs # 39;,, & # 39; File 集# 39;   ,,,,,,,,,& # 39;红外# 39;,,& # 39;Instance 恢复# 39;   ,,,,,,,,,& # 39;圣# 39;,,& # 39;Disk  Space 事务# 39;   ,,,,,,,,,& # 39;ts # 39;,, & # 39; Temp 段# 39;   ,,,,,,,,,& # 39;4 # 39;,,& # 39;Library  Cache 失效# 39;   ,,,,,,,,,& # 39;ls # 39;,, & # 39; Log  Start 一、开关# 39;   ,,,,,,,,,& # 39;rw # 39;,, & # 39; Row 等待# 39;   ,,,,,,,,,& # 39;平方# 39;,,& # 39;Sequence 数字# 39;   ,,,,,,,,,& # 39;te # 39;,, & # 39; Extend 表# 39;   ,,,,,,,,,& # 39;tt # 39;,, & # 39; Temp 表# 39;   ,,,,,,,,,类型)   ,,,,,,,lock_type,   ,,,,,DECODE  (lmode,   ,,,,,,,,,0,,& # 39;没有# 39;,,,,,,,,,,,,,/*,Mon  Lock  equivalent  */,,,,,,,,,1,,& # 39;零# 39;,,,,,,,,,,,,,,,,,,,,,,/*,N  */,,,,,,,,,2,,& # 39;Row-S  (SS) & # 39;,,,,,,,,,,,,,,,,,,,/*, L  */,,,,,,,,,3,,& # 39;Row-X  (SX) & # 39;,,,,,,,,,,,,,,,,,,,/*, R  */,,,,,,,,,4,& # 39;分享# 39;,,,,,,,,,,,,,,,,,,,,,/*,S  */,,,,,,,,,,,& # 39;S/Row-X  (SSX) & # 39;,,,,,,,,,,,,,,,,,/*, C  */null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null

甲骨文中有哪些锁处理方式