免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1046 | 回复: 0

oradebug [复制链接]

论坛徽章:
0
发表于 2011-12-22 08:53 |显示全部楼层

Reference from : http://www.orafaq.com/wiki/Oradebug

Oradebug is a command that can be executed from SQL*Plus (or Svrmgrl 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 <pid> SQL> oradebug event immediate trace name errorstack level 3

Dump RAC DLM locks:

SQL> oradebug lkdebug -a convlock SQL> oradebug lkdebug -a convres SQL> oradebug lkdebug -r <resource handle> (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


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP