码迷,mamicode.com
首页 > 其他好文 > 详细

20171114 oradebug

时间:2017-12-13 20:23:07      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:from   mst   evel   bug   acl   help   oradebug   res   test   

1、诊断事件
#10046
 
oradebug  setospid 12345     #setospid  指的是spid (v$process)
#或oradebug setorapid 12345   #setorapid 指的是pid (v$process)
oradebug unlimt                   #解除对追踪文件大小限制
oradebug event 10046 trace name context forever ,level 12
...
oradebug event 10046 trace name context off
oradebug tracefile_name
 
#10053
oradebug  setospid 12345   
oradebug setorapid 12345   
oradebug unlimt                
oradebug event 10053 trace name context forever ,level 1
...
oradebug event 10053 trace name context off
oradebug tracefile_name
 
example:
SQL> select spid,pid from v$process where addr=(select paddr from v$session where sid=493);  --对sid=493回话进行监控
SPID                            PID
------------------------ ----------
12787                            42
SQL> oradebug help
SQL> oradebug setospid 12787   #12787 是回话spid 号(v$process)
Oracle pid: 42, Unix process pid: 12787, image: oracle@hpcs01
SQL> oradebug unlimit;
Statement processed.
SQL> oradebug tracefile_name
/oracle/app/oracle/diag/rdbms/shihfa1/shihfa/trace/shihfa_ora_12787.trc
SQL> oradebug event 10046 trace name context forever ,level 12
Statement processed.
----sid=493执行操作
SQL> oradebug event 10046 trace name context off;
Statement processed.
 
2、诊断系统信息
模拟系统hang住
[oracle@test1 bdump]$ sqlplus -prelim  ‘/ as sysdba‘
SQL*Plus: Release 10.2.0.5.0 - Production on Fri May 20 10:48:32 2016
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
SQL> oradebug setmypid
Statement processed.
SQL> oradebug unlimit
Statement processed.
SQL> oradebug dump systemstate 266
Statement processed.
SQL> oradebug dump systemstate 266
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/db1/udump/db1_ora_11807.trc

20171114 oradebug

标签:from   mst   evel   bug   acl   help   oradebug   res   test   

原文地址:http://www.cnblogs.com/shihfa/p/8033758.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!