背景
在故障或性能诊断时,有时在在TRCE文件中会报各种ORACLE错误,可以针对这个错误,进行ERRORSTATCK特定跟踪,进行具体的分析;当然如何分析ERRORSTACK文件的内容,需要在另一文章在讨论与学习。
结论
1,errorstack语法请参考测试第1节2,errorstack产生的文件会包括具体错误的SQL语句或源头
3,通过oredebug生成errorstack文件
测试
1,语法
例子:
oradebug setospid
alter system set events='1438 trace name errorstack forever,level 10';
alter system set events='1438 trace name errorstack off';
oradebug tracefile_name
2,数据库版本
SQL> select * from v$version where rownum=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
SQL>
TABLESPACE_NAME FILE_NAME FILE_MB AUTOEX
------------------------------------------------------------ -------------------------------------------------- ---------- ------
NEW_UNDOTBS /oracle/oradata/guowang/new_undo1.dbf 109 OFF
SQL> select count(*) from t_1555 as of timestamp to_timestamp('2015-10-15 09:40:00','yyyy-mm-dd hh24:mi:ss');
select count(*) from t_1555 as of timestamp to_timestamp('2015-10-15 09:40:00','yyyy-mm-dd hh24:mi:ss')
*
ERROR at line 1:
ORA-01555: snapshot too old: rollback segment number 77 with name "_SYSSMU77_2420596589$" too small
SQL>
SQL> select spid,pid from v$process where addr='00000000DD651800';
SPID PID
------------------------------------------------ ----------
21723 177
SQL> oradebug setospid 21723
Oracle pid: 177, Unix process pid: 21723, image: oracle@seconary (TNS V1-V3)
SQL> alter system set events='1555 trace name errorstack forever,level 10';
System altered.
SQL> select count(*) from t_1555 as of timestamp to_timestamp('2015-10-15 09:40:00','yyyy-mm-dd hh24:mi:ss');
select count(*) from t_1555 as of timestamp to_timestamp('2015-10-15 09:40:00','yyyy-mm-dd hh24:mi:ss')
*
ERROR at line 1:
ORA-01555: snapshot too old: rollback segment number 77 with name "_SYSSMU77_2420596589$" too small
SQL> alter system set events='1555 trace name errorstack off';
System altered.
SQL> oradebug tracefile_name
/oracle/diag/rdbms/guowang/guowang/trace/guowang_ora_21723.trc
----- Error Stack Dump -----
ORA-01555: snapshot too old: rollback segment number 77 with name "???" too small
----- Current SQL Statement for this session (sql_id=7rst1mvf3t1c4) -----
select count(*) from t_1555 as of timestamp to_timestamp('2015-10-15 09:40:00','yyyy-mm-dd hh24:mi:ss')
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
*** 2015-10-17 09:49:45.572
skdstdst()+36 call kgdsdst() 000000000 ? 000000000 ?
7FFFA4696F88 ? 000000001 ?
7FFFA469B488 ? 000000000 ?
ksedst1()+98 call skdstdst() 000000000 ? 000000000 ?
7FFFA4696F88 ? 000000001 ?
000000000 ? 000000000 ?
ksedst()+34 call ksedst1() 000000000 ? 000000001 ?
7FFFA4696F88 ? 000000001 ?
000000000 ? 000000000 ?
dbkedDefDump()+2736 call ksedst() 000000000 ? 000000001 ?
7FFFA4696F88 ? 000000001 ?
000000000 ? 000000000 ?
ksedmp()+36 call dbkedDefDump() 00000000A ? 000000000 ?
7FFFA4696F88 ? 000000001 ?
000000000 ? 000000000 ?
dbkdaKsdActDriver() call ksedmp() 00000000A ? 000000000 ?
+1947 7FFFA4696F88 ? 000000001 ?
000000000 ? 000000000 ?
dbgdaExecuteAction( call dbkdaKsdActDriver() 2B2574B6B6F0 ? 7FFFA469DB30 ?
)+1020 7FFFA4696F88 ? 000000001 ?
000000000 ? 000000000 ?
dbgdaRunAction()+81 call dbgdaExecuteAction( 2B2574B6B6F0 ? 009138928 ?
0 ) 0020C0003 ? 7FFFA469DB30 ?
000000001 ? 000000000 ?
dbgdRunActions()+59 call dbgdaRunAction() 2B2574B6B6F0 ? 000000005 ?
0020C0003 ? 7FFFA469DB30 ?
000000001 ? 000000000 ?
dbgdProcessEventAct call dbgdRunActions() 2B2574B6B6F0 ? 000000005 ?
ions()+615 0020C0003 ? 7FFFA469DB30 ?
000000001 ? 000000000 ?
dbgdChkEventKgErr() call dbgdProcessEventAct 2B2574B
个人简介
8年oracle从业经验,具备丰富的oracle技能,目前在国内北京某专业oracle服务公司从事高级技术顾问。
服务过的客户:
中国电信
中国移动
中国联通
中国电通
国家电网
四川达州商业银行
湖南老百姓大药房
山西省公安厅
中国邮政
北京302医院
河北廊坊新奥集团公司
项目经验:
中国电信3G项目AAA系统数据库部署及优化
中国联通4G数据库性能分析与优化
中国联通4G数据库性能分析与优化
中国联通CRM数据库性能优化
中国移动10086电商平台数据库部署及优化
湖南老百姓大药房ERR数据库sql优化项目
四川达州商业银行TCBS核心业务系统数据库模型设计和RAC部署及优化
四川达州商业银行TCBS核心业务系统后端批处理存储过程功能模块编写及优化
北京高铁信号监控系统RAC数据库部署及优化
河南宇通客车数据库性能优化
中国电信电商平台核心采购模块表模型设计及优化
中国邮政储蓄系统数据库性能优化及sql优化
北京302医院数据库迁移实施
河北廊坊新奥data guard部署及优化
山西公安厅身份证审计数据库系统故障评估
国家电网上海灾备项目4 node rac+adg
贵州移动crm及客服数据库性能优化项目
贵州移动crm及客服务数据库sql审核项目
深圳穆迪软件有限公司数据库性能优化项目
贵州移动crm及客服数据库性能优化项目
贵州移动crm及客服务数据库sql审核项目
深圳穆迪软件有限公司数据库性能优化项目
联系方式:
手机:18201115468
qq : 305076427
qq微博: wisdomone1
新浪微博:wisdomone9
qq群:275813900
itpub博客名称:wisdomone1 http://blog.itpub.net/9240380/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-1815042/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-1815042/

9497

被折叠的 条评论
为什么被折叠?



