在某些情况下,数据库失去响应,sqlplus也无法连接,此时通常只能通过杀掉进程来解决。
但是我们仍然希望能够获得此时的数据库状态信息,以便用于事后诊断。
从Oracle10g开始,sqlplus提供了一个参数选项-prelim,可以在通常sqlplus无法连接的情况下进行连接。
通过以下步骤可以获取系统信息:
这种方法非常有用:
但是需要注意的是,在Oracle 10.2.0.1中,使用如上方法会出现一个错误:
此时在alert文件中会记录如下错误提示:
这是由于一个Bug导致的,Bug号为5730231,该Bug在10.2.0.3中修正。
记录一下!
-The End-
但是我们仍然希望能够获得此时的数据库状态信息,以便用于事后诊断。
从Oracle10g开始,sqlplus提供了一个参数选项-prelim,可以在通常sqlplus无法连接的情况下进行连接。
通过以下步骤可以获取系统信息:
sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit;
oradebug dump systemstate 10
这种方法非常有用:
$ sqlplus -prelim / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 09:42:20 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL>
但是需要注意的是,在Oracle 10.2.0.1中,使用如上方法会出现一个错误:
$ sqlplus -prelim / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 09:38:14 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> oradebug setmypid
Statement processed.
SQL> oradebug unlimit
Statement processed.
SQL> oradebug dump systemstate 10
ORA-03113: end-of-file on communication channel
ORA-24323: value not allowed
此时在alert文件中会记录如下错误提示:
Thu Oct 25 09:38:32 2007
System State dumped to trace file
Thu Oct 25 09:38:32 2007
Errors in file /opt/oracle/admin/test201/udump/test201_ora_1402.trc:
ORA-07445: exception encountered: core dump [kgldmp()+1360] [SIGSEGV] [Address not mapped to object] [0x000000030] [] []
这是由于一个Bug导致的,Bug号为5730231,该Bug在10.2.0.3中修正。
记录一下!
-The End-
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




