oradebug dumpvarPrint/dump a fixed PGA/SGA/UGA variable.Syntax Parameteroradebug dumpvar仅仅了解dumpvar命令的使用方法并没有意义,只有和有意义的内部变量结合起来才能真正起到高级诊断的作用,在这里抛砖引玉罗列出部分诊断变量:
[level] PGA,SGA or UGA fixed variable name [level]使用示例SQL> select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biPL/SQL Release 10.2.0.4.0 - ProductionCORE 10.2.0.4.0 ProductionTNS for Linux: Version 10.2.0.4.0 - ProductionNLSRTL Version 10.2.0.4.0 - ProductionSQL> select * from global_name;GLOBAL_NAME--------------------------------------------------------------------------------www.oracledatabase12g.comSQL> show parameter db_filesNAME TYPE VALUE------------------------------------ ----------- ------------------------------db_files integer 200SQL> oradebug setmypid;Statement processed.SQL> oradebug dumpvar sga kcfdpkkfil kcfdpk_ [698B950, 698B954) = 000000C8这里的KCFDPK变量保存了db_files参数的值,000000C8 == 200利用oradebug工具我们不仅可以做到对这些内部变量的窥视,还可以做到修改,但是这对我们实际的诊断没有益处,仅仅可以用来满足某些模拟实验
sgauso -- 该变量可以用于判断use_stored_outlinesSQL> oradebug setmypid;Statement processed.Default use_stored_outlines=false;SQL> oradebug dumpvar sga sgausoqolprm sgauso_ [060021418, 06002143C) =00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000SQL> alter system set use_stored_outlines=true;System altered.SQL> oradebug dumpvar sga sgausoqolprm sgauso_ [060021418, 06002143C) =00000001 45440007 4C554146 00000054 00000000 00000000 00000000 00000000 0000000045440007 4C554146 ==> DEFAULT,意为优化器使用DEFAULT category中存放的outline.ksmvpa -- the size of the variable part of the pgaSQL> oradebug dumpvar pga ksmvpab4 ksmvpa_ [0068AA6B4, 0068AA6B8) = 0000E920 -- 59680 byteskkjsre -- The SGA variable kkjsre must be 1 for jobs to execute automatically.SQL> oradebug dumpvar sga kkjsreword kkjsre_ [060025760, 060025764) = 00000001SQL> exec dbms_ijob.set_enabled(false);PL/SQL procedure successfully completed.SQL> oradebug dumpvar sga kkjsreword kkjsre_ [060025760, 060025764) = 00000000kcmsmx --the MAX reasonable scn SQL> oradebug dumpvar pga kcmsmxkscn kcmsmx_ [00B7E811C, 00B7E8124) = CA7F0000 00000C6C -- 11.2.0.2SQL> oradebug dumpvar pga kcmsmxkscn kcmsmx_ [0068AB02C, 0068AB034) = A701C000 00000B3D -- 10.2.0.4 Notice the MAX scn allowed on 11.2 is far higher that that at earlier releases(due to the fix from bug 9254170).Use the fix for 9254170 on ALL DBs with an SCN rate set to match between versions.Avoid excessive SCN generation rates.kcvlcm - logging checkpoints to alert - FALSESQL> show parameter log_checkpoints_to_alertNAME TYPE VALUE------------------------------------ ----------- ------------------------------log_checkpoints_to_alert boolean TRUESQL> oradebug dumpvar sga kcvlcmword kcvlcm_ [060019E88, 060019E8C) = 00000001SQL> alter system set log_checkpoints_to_alert=false;System altered.SQL> oradebug dumpvar sga kcvlcmword kcvlcm_ [060019E88, 060019E8C) = 00000000kcvcpr - false (a checkpoint is requested)SQL> oradebug dumpvar sga kcvcprword kcvcpr_ [060019E90, 060019E94) = 00000000kcvcpf - false (checkpointing fast)kcvgcw -false a global checkpointing is waitingSQL> oradebug dumpvar sga kcvgcwsword kcvgcw_ [060025748, 06002574C) = 00000000kcfcpd - true if checkpoint writes donekcvblg kcvblg[0] is s 1 incidate some file/s in backup modeSQL> oradebug dumpvar sga kcvblgub4 * kcvblg_ [060019E18, 060019E20) = 9A248508 00000000SQL> oradebug peek 0x9A248508 100[09A248508, 09A24856C) =00000001 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000002 0000000000000002 00000002 00000000 00000000 ...alter database begin backup;SQL> oradebug peek 0x9A248508 100[09A248508, 09A24856C) =00000001 00000003 00000003 00000003 0000000300000003 00000003 00000003 00000003 0000000300000003 00000003 00000003 00000003 ...kcsgscn_ -- current scn SQL> oradebug dumpvar sga kcsgscn_kcslf kcsgscn_ [0600122B0, 0600122E0) =01C7DB4B 00000000 00000000 00000000 01C7DB4B -- 298750190001E907 00000000 00000000 0000000000000000 00000000 60011F90 00000000 60011F90 is fixedSQL> select current_scn from v$database;CURRENT_SCN----------- 29875044kslwlst_ -- waiter list latchSQL> oradebug dumpvar sga kslwlstksllt kslwlst_ [200040AC, 20004174) =00000000 00000009 00000000 00000000 0000000000000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 ...kcfdfk -- 2 * db_filesSQL> oradebug dumpvar sga kcfdfkkfil kcfdfk_ [060017EF0, 060017EF4) = 00000190 --400 when db_files=200 SQL> alter system set db_files=2000 scope=spfile;System altered.SQL> oradebug dumpvar sga kcfdfkkfil kcfdfk_ [060017EF0, 060017EF4) = 00000FA0 --4000kcffsz Address of Datafile Size So kcbzib() passes in information about how many blocks to read( and where to start reading from ) The assertion is if (bno < 2 || bno + nblks - 1 > (kcflsz[fno] ? kcflsz[fno] : kcffsz[fno])) ============================================================== .......NOTE: This section is removed after 9g.................. { /* if the user gave us the block number then this is an external error, * but if the dba was internally generated then this is a corruption of * some kind. */ ASSERTNM5(usrdba, OERINM("kcfrbd_2"), fno, bno, nblks, kcflsz[fno], kcffsz[fno]);SQL> oradebug dumpvar sga kcffszub4 * kcffsz_ [060017F20, 060017F28) = 9988E700 00000000SQL> oradebug peek 0x9988E700 200[09988E700, 09988E7C8) =000000010007B200000309800000AF0000067CA00000320000280000000005000000000000000A0000000000000000000000060000040000 ...SQL> select blocks,to_char(blocks,'XXXXXXXX') hex_blocks from v$datafile; BLOCKS HEX_BLOCK---------- --------- 504320 7B200 199040 30980 44800 AF00 425120 67CA0 12800 3200 2621440 280000 1280 500 0 0 2560 A00 38400 9600 6400 1900 BLOCKS HEX_BLOCK---------- --------- 1536 600 262144 4000013 rows selected.kcflsz -- like kcffszSQL> oradebug dumpvar sga kcflszub4 * kcflsz_ [060017F28, 060017F30) = 99892588 00000000SQL> oradebug peek 0x99892588 200[099892588, 099892650) =00000000 0007B200 00030980 0000AF00 00067CA000003200 00280000 00000500 00000000 00000A0000000000 00000000 00000600 00040000 ...THe arguments are file number, block number, number of blocks, kcflsz[fno],kcffsz[fno]Error comes out of kcf.c.Can they try a validate structure cascade on this table and see what happens?Please update the customer field so that it does not read internal.kcf.c kcf.c Kernel Cache Files component. ksl.c Kernel Service layer Latching & Wait-post Implement. ksm.c Kernel Service Memory component implementation. kkj.c Kernel Kompiletime Job queue.