ORA-30012錯誤的解決過程

cnhtm發表於2009-11-28

1、故障現象:

data guard切換時,原來的standby節點無法啟動,報ORA-30012錯誤,內容為:

undo tablespace '%s' does not exist or of wrong type

2、問題定位:

因為是standby節點無法啟動,懷疑primary節點和standby節點的undo_tablespace名稱不同:

a)、在primary節點上檢查undo引數:

SQL> show parameter undo

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDTBS1

b)、因為備用節點無法啟動,且spfile為裸裝置,使用strings命令檢查undo引數

$ strings '/dev/rlv_spfile'|grep -i undo
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'

c)、找到錯誤的原因了

在primary節點上,undo_tablespace是UNDTBS1,而standby節點上undo_tablespace是UNDOTBS1,undo表空間名稱不同,但切換過來後,在standby節點上不存在UNDOTBS1表空間,只要standby節點上將undo_tablespace引數改為UNDTBS1就可以

3、解決過程

在standby節點上操作:

a)、關閉資料庫,用spfile成生pfile

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> create pfile='/tmp/initorcl.ora' from spfile='/dev/rlv_spfile';

File created.

b)、修改生成的pfile檔案,將*.undo_tablespace='UNDOTBS1'修改為*.undo_tablespace='UNDTBS1'

c)、用修改過的pfile生成spfile

[oracle@oracle ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Nov 28 10:24:00 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> create spfile='/dev/rlv_spfile' from pfile='/tmp/initorcl.ora';

File created.

d)、啟動資料庫

SQL> startup;
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218292 bytes
Variable Size 71305484 bytes
Database Buffers 88080384 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL>
[@more@]

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

相關文章