Events是Oracle的重要诊断工具,通过该工具寻求解决问题的方法。很多情况下需要通过Events设置来过滤所需的事件信息。比如之前我们为了收集控制信息使命令:alter session set events'immediate trace name controlf level 12'
关于Control file的dump级别
ALTER SESSION SET EVENTS 'immediate trace name controlf level n';
level 1 文件头信息
level 2 1 + 数据库信息 + 检查点信息
level 3 2 + ALL
level 12 3 + 更详细的记录。
关于File Header的dump级别
ALTER SESSION SET EVENTS 'immediate trace name file_hdrs level n';
level 1 控制文件中的文件头信息
level 2 1+文件头信息
level 3 2+数据文件头信息
在spfile中添加Events设置:
SQL> alter system set event='10841 trace name context forever' scope=spfile; SQL> show parameter event NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ event string 10841 trace name context forever
《DBA入门、进阶与诊断案例》中提到跟踪10841事件是解决Oracle 9i中JDBC Thin Driver问题的方法,如果在alter_<sid_name>.log文件中出现以下错误提示:
Wed Jan 7 17:17:08 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1775.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:17:18 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1777.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:17:24 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1783.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:17:31 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1785.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:17:39 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1777.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:17:45 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1783.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:17:52 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1787.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:18:11 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1791.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], [] Wed Jan 7 17:18:19 2004 Errors in file /opt/oracle/admin/phsdb/udump/phsdb_ora_1785.trc: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
可能是遇到Bug 1725012,设置该事件后,可以屏蔽和解决这个内部错误,具提解决方式来源Metalink文档。
SQL> alter system reset event scope=spfile; SQL> startup force SQL> show parameter event NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ event string