首页 > 数据库 > Oracle > Enqueue Solution

Enqueue Solution

原创 Oracle 作者:nwpu053871 时间:2016-04-07 22:11:56 0 删除 编辑
SQ – Sequence Lock
      logon/logoff problem

TX  - mode 6 – application problem
      Look at what application is doing
      Find SQL
      Look at locked  data

TX - mode 4
     probably ITL problem
     find the object and SQL

HW – High Water
      Look at  object and SQL
      use LMT, freelists, pre-allocate extents

ST - Space Transaction 
     only one per database
     used for space allocations uet, fet
     Find  object
     use LMT

UL - User Lock
     find out what application is doing 

SELECT /*+ ordered */
 a.sid            blocker_sid,
 a.username       blocker_username,
 b.lmode          mode_held,
 b.ctime          time_held,
 c.sid            waiter_sid,
 c.request        request_mode,
 c.ctime          time_waited,
 a.sql_hash_value blocker_sql_hash_value,
 d.sql_hash_value waiter_sql_hash_value
  FROM v$lock b, v$enqueue_lock c, v$session a, v$session d
 WHERE a.sid = b.sid
   AND b.id1 = c.id1(+)
   AND b.id2 = c.id2(+)
   AND c.type(+) = 'TX'
   AND b.type = 'TX'
   AND b.block = 1
   AND c.sid = d.sid
 ORDER BY time_held, time_waited


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

下一篇: 高并发Tips
请登录后发表评论 登录


  • 博文量
  • 访问量