Oracle事件10704可以帮助我们了解队列Enqueue的使用情况,使用方法如下:
[oracle@rh2 bdump]$ oerr ora 10704 10704, 00000, "Print out information about what enqueues are being obtained" // *Cause: When enabled, prints out arguments to calls to ksqcmi and // ksqlrl and the return values. // *Action: Level indicates details: // Level: 1-4: print out basic info for ksqlrl, ksqcmi // 5-9: also print out stuff in callbacks: ksqlac, ksqlop // 10+: also print out time for each line SQL> oradebug setmypid; Statement processed. SQL> oradebug event 10704 trace name context forever,level 10; Statement processed. SQL> lock table tm in share mode; Table(s) Locked. SQL> oradebug tracefile_name; /s01/admin/G10R2/udump/g10r2_ora_28400.trc ksqgtl *** CU-9fec6e30-00000000 mode=6 flags=0x10 timeout=300 *** ksqgtl: no transaction ksqgtl: use existing ksusetxn DID ksqgtl: ksqlkdid: 0001-0017-00000008 *** 2011-05-07 21:17:16.139 *** ksudidTrace: ksqgtl ksusesdi: 0000-0000-00000000 ksusetxn: 0001-0017-00000008 ksqgtl: RETURNS 0 *** 2011-05-07 21:17:16.160 ksqrcl: CU,9fec6e30,0 ksqrcl: returns 0 *** 2011-05-07 21:17:23.884 ksqgtl *** CU-9fec69f8-00000000 mode=6 flags=0x10 timeout=300 *** ksqgtl: no transaction ksqgtl: use existing ksusetxn DID ksqgtl: ksqlkdid: 0001-0017-00000008 *** 2011-05-07 21:17:23.884 *** ksudidTrace: ksqgtl ksusesdi: 0000-0000-00000000 ksusetxn: 0001-0017-00000008 ksqgtl: RETURNS 0 *** 2011-05-07 21:17:23.898 ksqrcl: CU,9fec69f8,0 ksqrcl: returns 0 *** 2011-05-07 21:17:23.899 ksqgtl *** TM-0000d06b-00000000 mode=4 flags=0x401 timeout=21474836 *** ksqgtl: xcb=0xa69d0a00, ktcdix=2147483647, topxcb=0xa69d0a00 ktcipt(topxcb)=0x0 *** 2011-05-07 21:17:23.899 ksucti: init txn DID from session DID 0001-0017-00000008 ksqgtl: ksqlkdid: 0001-0017-00000008 *** 2011-05-07 21:17:23.899 *** ksudidTrace: ksqgtl ktcmydid(): 0001-0017-00000008 ksusesdi: 0000-0000-00000000 ksusetxn: 0001-0017-00000008 ksqgtl: RETURNS 0
该10704事件可以配合10046事件一起诊断异常的队列锁问题,记以录之!
本文转自maclean_007 51CTO博客,原文链接:http://blog.51cto.com/maclean/1276758