Chinaunix首页 | 论坛 | 博客
  • 博客访问: 218140
  • 博文数量: 57
  • 博客积分: 1376
  • 博客等级: 中尉
  • 技术积分: 658
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-09 09:51
文章分类

全部博文(57)

文章存档

2012年(1)

2011年(56)

分类: Oracle

2011-07-11 00:22:41

Reference from :

Oradebug is a command that can be executed from (or in Oracle 8i and lower releases) to display or dump diagnostics information.

Execute the "ORADEBUG HELP" command to obtain a list of valid ORADEBUG commands.

It looks like one can change memory locations with the ORADEBUG POKE command. Anyone brave enough to test this one for us?

Examples

Look at these oradebug examples:

Trace SQL statements with bind variables:

SQL> oradebug setospid 10121 Oracle pid: 91, Unix process pid: 10121, image: oracleorcl SQL> oradebug EVENT 10046 trace name context forever, level 12 Statement processed. SQL> ! vi /app/oracle/admin/orcl/bdump/ora_10121.trc

Trace Process Statistics:

SQL> oradebug setorapid 2 Unix process pid: 1436, image: ora_pmon_orcl SQL> oradebug procstat Statement processed. SQL> oradebug TRACEFILE_NAME /app/oracle/admin/orcl/bdump/pmon_1436.trc

List semaphores and shared memory segments in use:

SQL> oradebug ipc

Dump Error Stack:

SQL> oradebug setospid SQL> oradebug event immediate trace name errorstack level 3

Dump DLM locks:

SQL> oradebug lkdebug -a convlock SQL> oradebug lkdebug -a convres SQL> oradebug lkdebug -r (i.e 0x8066d338 from convres dump)
try in my env:
SQL> select addr, pid, spid, program from  v$process;

ADDR            PID SPID         PROGRAM
-------- ---------- ------------ ------------------------------------------------
38D1ED68          1              PSEUDO
38D1F31C          2 3041         oracle@milo.com (PMON)
38D1F8D0          3 3043         oracle@milo.com (PSP0)
38D1FE84          4 3045         oracle@milo.com (MMAN)
38D20438          5 3047         oracle@milo.com (DBW0)
38D209EC          6 3049         oracle@milo.com (LGWR)
38D20FA0          7 3051         oracle@milo.com (CKPT)
38D21554          8 3053         oracle@milo.com (SMON)
38D21B08          9 3055         oracle@milo.com (RECO)
38D220BC         10 3057         oracle@milo.com (MMON)
38D22670         11 3059         oracle@milo.com (MMNL)
38D22C24         12 3061         oracle@milo.com (TNS V1-V3)
38D231D8         13 3063         oracle@milo.com (ARC0)
38D2378C         14 3065         oracle@milo.com (ARC1)
38D23D40         15 3203         oracle@milo.com (q001)
38D242F4         16 3069         oracle@milo.com (QMNC)
38D248A8         17 3211         oracle@milo.com (q002)
38D25410         19 3081         oracle@milo.com (q000)

18 rows selected.

SQL> oradebug setospid 3069
Oracle pid: 16, Unix process pid: 3069, image: oracle@milo.com (QMNC)
SQL> oradebug procstat
Statement processed.
SQL> oradebug TRACEFILE_NAME
/u01/app/oracle/admin/liuzhou/bdump/liuzhou_qmnc_3069.trc
SQL>
SQL>
SQL> oradebug setorapid 2
Unix process pid: 3041, image: oracle@milo.com (PMON)
SQL> oradebug procstat
Statement processed.
SQL> oradebug TRACEFILE_NAME
/u01/app/oracle/admin/liuzhou/bdump/liuzhou_pmon_3041.trc


阅读(1634) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~