- 最后登录
- 2018-11-1
- 在线时间
- 377 小时
- 威望
- 29
- 金钱
- 6866
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 891
- 精华
- 4
- 积分
- 29
- UID
- 1
|
2#
发表于 2012-4-27 22:37:15
GRD Global Resource Directory 中的GCS Client structure会记录 相关CR 的统计信息
SQL> select * from v$version
2 ;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump gc_elements 255;
GLOBAL CACHE ELEMENT DUMP (address: 0x94f77c80):
id1: 0xf0 id2: 0x3 pkey: TS#2 block: (3/240)
lock: C rls: 0x0 acq: 0x0 latch: 2
flags: 0x21 fair: 0 recovery: 0 fpin: 'ktuwh87: ktugus:ktuGetExtTxnInfo'
bscn: 0x0.3a3b3 bctx: (nil) write: 0 scan: 0x0
lcp: (nil) lnk: [NULL] lch: [0x93fc4c30,0x94f77440]
seq: 11 hist: 197 51 39 74:2 324 21 143:0 19 16 352 32
GCS CLIENT 0x94f77cf8,2 resp[(nil),0xf0.3] pkey 2.1
grant 0 cvt 0 mdrole 0x0 st 0x0 lst 0x20 GRANTQ rl LOCAL
master 1 owner 2 sid 0 remote[(nil),0] hist 0x4781cb8c
history 0xc.0x17.0x7.0x3c.0x4.0x0.0x0.0x0.0x0.0x0.
cflag 0x0 sender 1 flags 0x0 replay# 0 abast (nil).x0.1 dbmap (nil)
disk: 0x0000.00000000 write request: 0x0000.00000000
pi scn: 0x0000.00000000 sq[(nil),(nil)]
msgseq 0x0 updseq 0x0 reqids[1,0,0] infop (nil) lockseq x36
pkey 2.1 undo 1 stat 0 masters[1, 1->1] reminc 2 RM# 1
flg x1 type x0 afftime xc4031203, acquire time 0
nreplays by lms 0 = 0
benefit 0, total 0, remote 0, cr benefit 0, cr total 0, cr remote 0
hv 3 [stat 0x0, 1->1, wm 32768, RMno 0, reminc 0, dom 0]
kjga st 0x4, step 0.0.0, cinc 4, rmno 2, flags 0x0
lb 0, hb 0, myb 8222, drmb 8222, apifrz 0
GCS CLIENT END
但是 GRD 中 GC Element 、 GCS Shadow和 GCS client Structure 本身与 CR block无关:
[oracle@vrh2 ~]$ grep "^ st: " /s01/orabase/diag/rdbms/maclean_g11r23/MACLEAN2/trace/MACLEAN2_ora_10177.trc
st: SCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 le: 0x93fd8bc0
st: SCURRENT md: NULL fpin: 'kdswh05: kdsgrp' tch: 1 le: 0x93f97640
st: SCURRENT md: NULL fpin: 'kdswh11: kdst_fetch' tch: 1 le: 0x93febdc0
st: SCURRENT md: NULL fpin: 'kdswh07: kdstlps' tch: 1 le: 0x94f9cc50
st: SCURRENT md: NULL fpin: 'kdswh07: kdstlps' tch: 1 le: 0x94f7f050
st: SCURRENT md: NULL fpin: 'kdswh07: kdstlps' tch: 1 le: 0x94f88950
st: SCURRENT md: NULL fpin: 'kdswh06: kdscgr' tch: 1 le: 0x93fa6cc0
st: SCURRENT md: NULL fpin: 'kdswh06: kdscgr' tch: 1 le: 0x93f8c3c0
st: SCURRENT md: NULL fpin: 'kdswh07: kdstlps' tch: 1 le: 0x94f93350
st: SCURRENT md: NULL fpin: 'ktewh26: kteinpscan' tch: 1 le: 0x93ff9240
st: SCURRENT md: NULL fpin: 'kdswh07: kdstlps' tch: 1 le: 0x94fb9750
st: SCURRENT md: NULL fpin: 'kdswh07: kdstlps' tch: 1 le: 0x94fc05d0
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 14 atm: 3297529166,1699351341
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 14 atm: 3297529166,1699351590
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 3 atm: 3300002229,1699351669
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 15 atm: 3297538303,1699351732
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 3 atm: 4201253608,1699351743
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 15 atm: 3297571168,1699351819
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 4 atm: 3299591029,1699351888
st: XCURRENT md: NULL fpin: 'kdswh02: kdsgrp' tch: 2 le: 0x93f82ac0
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 15 atm: 3297551589,1699351945
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 5 atm: 3299631939,1699352017
st: XCURRENT md: NULL fpin: 'ktswh72: ktsbget' tch: 1 le: 0x94fd89a0
st: XCURRENT md: NULL fpin: 'kdswh02: kdsgrp' tch: 2 le: 0x93f82ac0
st: XCURRENT md: NULL fpin: 'ktswh72: ktsbget' tch: 1 le: 0x94fd89a0
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 3 atm: 3300002229,1699352257
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 15 atm: 3297538303,1699352337
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 3 atm: 4201253608,1699352601
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 15 atm: 3297571168,1699352663
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 4 atm: 3299591029,1699352732
st: XCURRENT md: NULL fpin: 'ktuwh72: ktugus:ktuswr1' tch: 15 atm: 3297551589,1699352739
st: XCURRENT md: NULL fpin: 'ktuwh03: ktugnb' tch: 5 atm: 3299631939,1699352812
[oracle@vrh2 ~]$ grep "^ st: " /s01/orabase/diag/rdbms/maclean_g11r23/MACLEAN2/trace/MACLEAN2_ora_10177.trc|awk '{print $2}' | uniq -u
XCURRENT
SCURRENT
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump buffers 4;
Statement processed.
SQL> oradebug tracefile_name
/s01/orabase/diag/rdbms/maclean_g11r23/MACLEAN2/trace/MACLEAN2_ora_13623.trc
BH (0xc0efa008) file#: 1 rdba: 0x00408489 (1/33929) class: 1 ba: 0xc04c6000
set: 6 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 0,15
dbwrid: 0 obj: 13952 objn: 13952 tsn: 0 afn: 1 hint: f
hash: [0xc1f0a7a0,0xd8db9398] lru: [0xc0ef9f78,0xc0efa268]
lru-flags: debug_dump moved_to_tail
ckptq: [NULL] fileq: [NULL] objq: [NULL] objaq: [NULL]
st: CR md: NULL fpin: 'kdswh01: kdstgr' tch: 1 le: (nil)
cr: [scn: 0x0.3d492],[xid: 0x0.0.0],[uba: 0x0.0.0],[cls: 0x0.3d492],[sfl: 0x0],[lc: 0x0.0]
flags: only_sequential_access
CR buffer header 没有 LE lock element
BH (0xc0ef31e0) file#: 1 rdba: 0x00400c38 (1/3128) class: 4 ba: 0xc0430000
set: 6 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 0,15
dbwrid: 0 obj: 458 objn: 458 tsn: 0 afn: 1 hint: f
hash: [0xc2f1e078,0xd8e9bab8] lru: [0xc0ef3440,0xc0ef2fd8]
lru-flags: debug_dump
ckptq: [NULL] fileq: [NULL] objq: [0xd18195f0,0xd18195f0] objaq: [0xd18195e0,0xd18195e0]
st: XCURRENT md: NULL fpin: 'ktswh28: ktsgsp' tch: 1 le: 0x94fd8ef0
flags: block_written_once redo_since_read
LRBA: [0x0.0.0] LSCN: [0x0.0] HSCN: [0xffff.ffffffff] HSUB: [3]
XCURRENT 的Buffer header 可能会有 Lock element
BH (0x96eccbf0) file#: 1 rdba: 0x00417609 (1/95753) class: 1 ba: 0x960ec000
set: 6 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 58,28
dbwrid: 0 obj: 84318 objn: 84318 tsn: 0 afn: 1 hint: f
hash: [0x8df54a60,0x8df54308] lru: [0x8df547a8,0x8df551f0]
obj-flags: object_ckpt_list
ckptq: [0x8eecba50,0x8df54ca0] fileq: [0xd6eb8370,0x8df679c8] objq: [0xcedd4f28,0xcedd4f28] objaq: [0xcedd4f08,0x8df55228]
st: PI md: NULL tch: 1 le: 0x7bfa6000 -- Past Image
cr: [scn: 0x0.ac6452],[xid: 0x0],[uba: 0x0],[cls: 0x0.ac6452],[sfl: 0x0]
flags: buffer_dirty remote_transfered
LRBA: [0x132.a1c.0] LSCN: [0x0.abb823] HSCN: [0x0.ac6451] HSUB: [2]
cr pin refcnt: 0 sh pin refcnt: 0
PI 的 buffer header 也会有 Lock Element |
|