一次資料庫無法登陸的"問題"及排查

jeanron100發表於2014-06-21
繼昨天發生san儲存切換導致io等待異常高的問題後,晚上客戶對測試環境的資料庫進行了遠端啟動,因為庫比較多,監控process都起來了。客戶就發郵件通知測試組繼續測試。
結果早上測試反饋有一個庫怎麼都等不了。
他們提供的日誌如下:
sqlplus test3c/xxxx@testdb
SQL*Plus: Release 11.2.0.2.0 Production on Sat Jun 21 12:59:36 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0

猛一看是資料庫可能沒起來,但是根據客戶的郵件說庫都起來了。
就開始排查,大週末的只能很艱難的連上vpn來看了。
透過客戶端,問題可以復現,直接連入db伺服器,透過dba賬戶來連線。
sqlplus jianrong/jianrong@testdb
SQL*Plus: Release 11.2.0.2.0 Production on Sat Jun 21 13:05:42 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

透過sysdba來連線,貌似是連上了。
 sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Sat Jun 21 13:07:06 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter back
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
。。。。。。

檢視對應的process的情況,process確實存在。而且是半夜1點多起的。
3071     18455     1  0 01:51 ?        00:00:00 ora_smon_TESTDB

查到這,還沒有找到其他的線索,來看看alert日誌怎麼說吧。一檢視直接暈倒。
。。。。
alter database open
Sat Jun 21 13:02:48 2014
Errors in file /opt/app/oracle/testdb/diag/rdbms/testdb/TESTDB/trace/TESTDB_dbw0_18440.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/u01/oracle/TESTDB/orarbs01/rbs/undotbs01.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /opt/app/oracle/testdb/diag/rdbms/testdb/TESTDB/trace/TESTDB_ora_18358.trc:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/u01/oracle/TESTDB/orarbs01/rbs/undotbs01.dbf'
ORA-1157 signalled during: alter database open...

原來庫就沒起來,被誤導了。檢視庫的狀態。
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED

剩下的事情就是從備份中拿到undo來做恢復了。給客戶簡單說了一下情況,馬上問題就解決了,虛驚一場。



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23718752/viewspace-1190720/,如需轉載,請註明出處,否則將追究法律責任。

相關文章