- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
3#
发表于 2012-2-6 20:18:35
ODM Finding:
- know more about library cache lock/pin
-
- SQL> select * from v$version;
- BANNER
- ----------------------------------------------------------------
- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
- PL/SQL Release 10.2.0.1.0 - Production
- CORE 10.2.0.1.0 Production
- TNS for Linux: Version 10.2.0.1.0 - Production
- NLSRTL Version 10.2.0.1.0 - Production
- SQL> alter system flush shared_pool;
- System altered.
- session 1:
- SQL> alter table sh.sales add t10 char(2000) default 'a';
- session 2:
- select /* oppo_maclean_liu */ 1 from sh.sales where rownum<2;
- session 3 :
- SQL> oradebug setmypid;
- Statement processed.
- SQL> oradebug dump systemstate 266 ;
- Statement processed.
- SQL> oradebug tracefile_name;
- /s01/admin/G10R21/udump/g10r21_ora_10362.trc
- 认识一个父游标,以下是一个父游标的 Libryary Cache Object 、Handle和Lock信息
- SO: 0x8006da40, type: 53, owner: 0x84f5b4a8, flag: INIT/-/-/0x00
- LIBRARY OBJECT LOCK: lock=8006da40 handle=7fab09b8 mode=N
- call pin=(nil) session pin=(nil) hpc=0000 hlc=0000
- htl=0x8006dac0[0x80c34660,0x80c34940] htb=0x81038258 ssga=0x81038020
- user=84f5b4a8 session=84f5b4a8 count=1 flags=[0000] savepoint=0x50
- LIBRARY OBJECT HANDLE: handle=7fab09b8 mutex=0x7fab0ae8(0)
- name= select /* oppo_maclean_liu */ 1 from sh.sales where rownum<2 ==>只有父游标有SQL_TEXT和hash_value,子游标是没有的
- hash=b37126bce26772579a163abee02e2e13 timestamp=02-06-2012 21:59:06
- namespace=CRSR flags=RON/KGHP/TIM/KEP/PN0/MED/DBN/[50010044] ==> Nanespace =CRSR 即CURSOR
- kkkk-dddd-llll=0001-0001-0001 lock=N pin=0 latch#=1 hpc=0002 hlc=0002 ==》lock=NULL , no pinned
- lwt=0x7fab0a60[0x7fab0a60,0x7fab0a60] ltm=0x7fab0a70[0x7fab0a70,0x7fab0a70]
- pwt=0x7fab0a28[0x7fab0a28,0x7fab0a28] ptm=0x7fab0a38[0x7fab0a38,0x7fab0a38]
- ref=0x7fab0a90[0x7fab0a90,0x7fab0a90] lnd=0x7fab0aa8[0x80a850a8,0x7dbc2d10]
- LIBRARY OBJECT: object=7fd963c0
- type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
- CHILDREN: size=16
- child# table reference handle
- ------ -------- --------- --------
- 0 80fe3cd8 80fe3948 7ab2ea78 =》 Object Tables Child table 这里指向一个child cursor 的Handle
- DATA BLOCKS:
- data# heap pointer status pins change whr
- ----- -------- -------- --------- ---- ------ ---
- 0 7a8ccc00 7fd964d8 I/P/A/-/- 0 NONE 00 =>一般parent cursor只有Heap 0即 library cache object本身 KGLOB
-
-
-
- 认识一个子游标,以下是一个子游标的 Libryary Cache Object 、Handle和Lock信息
-
- SO: 0x807c9770, type: 54, owner: 0x84f5b4a8, flag: INIT/-/-/0x00
- LIBRARY OBJECT PIN: pin=807c9770 handle=7ab2ea78 mode=X lock=0
- user=84f5b4a8 session=84f5b4a8 count=0 mask=0041 savepoint=0x51 flags=[04]
- ----------------------------------------
- SO: 0x80c348c0, type: 53, owner: 0x84f5b4a8, flag: INIT/-/-/0x00
- LIBRARY OBJECT LOCK: lock=80c348c0 handle=7ab2ea78 mode=N
- call pin=(nil) session pin=(nil) hpc=0000 hlc=0000
- htl=0x80c34940[0x8006dac0,0x81038258] htb=0x81038258 ssga=0x81038020
- user=84f5b4a8 session=84f5b4a8 count=1 flags=[0000] savepoint=0x0
- LIBRARY OBJECT HANDLE: handle=7ab2ea78 mutex=0x7ab2eba8(0)
- namespace=CRSR flags=RON/KGHP/PN0/[10010000]
- kkkk-dddd-llll=0000-0001-0000 lock=N pin=X latch#=1 hpc=0002 hlc=0002 => lock NULL, PIN Exclusive
- lwt=0x7ab2eb20[0x7ab2eb20,0x7ab2eb20] ltm=0x7ab2eb30[0x7ab2eb30,0x7ab2eb30]
- pwt=0x7ab2eae8[0x7ab2eae8,0x7ab2eae8] ptm=0x7ab2eaf8[0x7ab2eaf8,0x7ab2eaf8]
- ref=0x7ab2eb50[0x80fe3948,0x80fe3948] lnd=0x7ab2eb68[0x7ab2eb68,0x7ab2eb68]
- LIBRARY OBJECT: object=7e1f6098
- type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
- READ ONLY DEPENDENCIES: count=1 size=16
- DATA BLOCKS:
- data# heap pointer status pins change whr
- ----- -------- -------- --------- ---- ------ ---
- 0 80dfc2b8 80d91570 I/P/A/-/- 0 NONE 00
- 6 7aed0b08 80f94a58 I/P/A/-/- 1 NONE 00 => heap 6 pined in exclusive mode
复制代码 |
|