Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

3

积分

0

好友

0

主题
1#
发表于 2012-1-9 14:26:33 | 查看: 5821| 回复: 2
通常系统出现问题,如hang或者感觉数据库不正常从表面看到明显的缘由时有时候会dump systemstat进行分析,对于oradebug dump systemstat 10 和oradebug -g all dump systemstat 267这两个级别有啥区别,我知道后面一个命令是针对rac的,我想主要知道这里的267 level和10 level有什么区别?
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

回复 只看该作者 道具 举报

3#
发表于 2012-1-9 19:42:29
总结:

level 266= SYSTEM STATE (level=10, with short stacks) =  level 10 + short stacks

level 266 在level 10的基础上包含了进程的short stacks信息

level 10  = Dump all processes (IGN state)

level 267= 100001011 = short stacks + Dump all processes + HANGANALYZE output

回复 只看该作者 道具 举报

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

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-24 00:46 , Processed in 0.057065 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569