Library Cache DUMP Analyze

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

下面示例表示bucket 84上挂在了2个object handle
BUCKET 84:
  LIBRARY OBJECT HANDLE: handle=2b733140 mutex=0x2b7331f4(1)                                          –GKLHD    handle
  name=
select   LOW_OPTIMAL_SIZE,           HIGH_OPTIMAL_SIZE,           OPTIMAL_EXECUTIONS,           ONEPASS_EXECUTIONS,           MULTIPASSES_EXECUTIO
NS,           TOTAL_EXECUTIONS    from   GV$SQL_WORKAREA_HISTOGRAM    where  INST_ID = USERENV(‘Instance’)
  hash=1cb59bc0340f2b79174a091cda040054 timestamp=01-06-2010 01:00:07
  namespace=CRSR flags=RON/KGHP/TIM/PN0/MED/KST/DBN/MTX/[500100d0]
  kkkk-dddd-llll=0000-0001-0001 lock=0 pin=0 latch#=3 hpc=0000 hlc=0000
  lwt=0x2b73319c[0x2b73319c,0x2b73319c] ltm=0x2b7331a4[0x2b7331a4,0x2b7331a4]
  pwt=0x2b733180[0x2b733180,0x2b733180] ptm=0x2b733188[0x2b733188,0x2b733188]
  ref=0x2b7331bc[0x2b7331bc,0x2b7331bc] lnd=0x2b7331c8[0x2b72f5dc,0x2b737ce8]
    LIBRARY OBJECT: object=2c1a99a8
    type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
    CHILDREN: size=16                                                                               –Child Cursor0
    child#    table reference   handle
    —— ——– ——— ——–
         0 2c242318  2c241fcc 2b56f39c
  LIBRARY OBJECT HANDLE: handle=31142068 mutex=0x3114211c(0)
  name=table_4_9_115f_0_0_0
  hash=037217e511a06ffd341b90a655700054 timestamp=01-05-2010 22:50:32
  namespace=CRSR flags=RON/KGHP/TIM/KEP/PN0/SML/DBN/[12010044]
  kkkk-dddd-llll=0001-0001-0001 lock=N pin=0 latch#=3 hpc=0002 hlc=0002
  lwt=0x311420c4[0x311420c4,0x311420c4] ltm=0x311420cc[0x311420cc,0x311420cc]
  pwt=0x311420a8[0x311420a8,0x311420a8] ptm=0x311420b0[0x311420b0,0x311420b0]
  ref=0x311420e4[0x311420e4,0x311420e4] lnd=0x311420f0[0x31141084,0x31147bd0]
    LIBRARY OBJECT: object=2c0a9d04                                                                   -KGLOB object of lib cache
    type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
    CHILDREN: size=16
    child#    table reference   handle
    —— ——– ——— ——–
         0 2c0a9c90  2c0a9944 31141f24
——————-
示例2 Dump子handle
BUCKET 25260:
  LIBRARY OBJECT HANDLE: handle=298d0e58 mutex=0x298d0f0c(1)
  name=
select substrb(dump(val,16,0,32),1,120) ep, cnt from (select /*+ no_parallel(t) no_parallel_index(t) dbms_stats cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_mon
itoring */”SCHEMA” val,count(*) cnt  from “SYS”.”EXPDEPACT$” t  where “SCHEMA” is not null  group by “SCHEMA”) order by nlssort(val,’NLS_SORT = binary’)
  hash=dc8135e8538594f57542fbe9845262ac timestamp=02-16-2012 00:16:58
  namespace=CRSR flags=RON/KGHP/TIM/KEP/PN0/LRG/KST/DBN/MTX/[100100d5]
  kkkk-dddd-llll=0001-0001-0001 lock=0 pin=0 latch#=3 hpc=0000 hlc=0000
  lwt=0x298d0eb4[0x298d0eb4,0x298d0eb4] ltm=0x298d0ebc[0x298d0ebc,0x298d0ebc]
  pwt=0x298d0e98[0x298d0e98,0x298d0e98] ptm=0x298d0ea0[0x298d0ea0,0x298d0ea0]
  ref=0x298d0ed4[0x298d0ed4,0x298d0ed4] lnd=0x298d0ee0[0x29a422d8,0x298cf048]
    LIBRARY OBJECT: object=270a2920
    type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
    CHILDREN: size=16
    child#    table reference   handle
    —— ——– ——— ——–
         0 270f9afc  270f97b0 29adcf34
  BUCKET 25260 total object count=1

oradebug dump heapdump_addr<level><address> <level>
1 dump structure
2 also include contents
(需要转换地址)

alter session setevents ‘immediate trace name heapdump_addr level 2,addr 0x2aa6d254’