- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-1-9 19:41:41
dump systemstate的语法为:
ALTER SESSION SET EVENTS ‘immediate trace name systemstate level 10′;
也可以使用ORADEBUG实现这个功能:
sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit;
oradebug dump systemstate 10
如果希望在数据库发生某种错误时调用systemstate事件,可以在参数文件(spfile或者pfile)中设置event参数,
例如,当系统发生死锁(出现ORA-00060错误)时dump systemstate:
event = “60 trace name systemstate level 10″
LEVEL参数:
10 Dump all processes (IGN state)
5 Level 4 + Dump all processes involved in wait chains (NLEAF state)
4 Level 3 + Dump leaf nodes (blockers) in wait chains (LEAF,LEAF_NW,IGN_DMP state)
3 Level 2 + Dump only processes thought to be in a hang (IN_HANG state)
1-2 Only HANGANALYZE output, no process dump at all
level 266= SYSTEM STATE (level=10, with short stacks) = level 10 + short stacks
level 266 在level 10的基础上包含了进程的short stacks信息
clarify the level 267 you discussed at the meeting, as well as the
steps for the customer to follow to take the dump. We had given them info
below before.
The levels are defined as follows:
* 1 Very basic process information only
* 2 Process + session state objects
* 10 Most common level - includes state object trees for all
processes
* Level+256 Adding 256 to the level will try to dump short stack info
for each process.
For Oracle 9.2.0.5 and less use level 10 instead of 266
ALTER SESSION SET EVENTS ‘IMMEDIATE TRACE NAME SYSTEMSTATE LEVEL 266′;
Level 266 includes short stacks (Oracle function calls) which are useful for Oracle Developers to determine which Oracle function’s are causing the problem. This is also helpful in matching existing bugs.
systemstate 267 -- dump systemstate with short callstacks
Processing Oradebug command 'dump systemstate 267'
===================================================
SYSTEM STATE (level=11, with short stacks)
267 = 100001011 = short stacks + Dump all processes + HANGANALYZE output |
|