天天看點

ORA-01103錯誤解析

ORA-01103錯誤解析

作者:吳偉龍

Name: PrudenceWoo

1、環境介紹:

   這是一測試庫,我将參數檔案,控制檔案,資料檔案全部删除之後,做資料恢複,但是

我把控制檔案和參數檔案都恢複回來了,可資料庫卻怎麼也打不開,報ORA-01103: database name 'WWL' in control file is not 'DUMMY'錯誤

我的資料庫名稱是:WWL

2、執行過程:

恢複參數檔案:

RMAN> setDBID=5520179

executing command: SET DBID

RMAN> restorespfile from autobackup;

Starting restore at 23-MAY-12

using target database control file insteadof recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=39 devtype=DISK

channel ORA_DISK_1: looking for autobackupon day: 20120523

channel ORA_DISK_1: autobackup found:c-5520179-20120523-04

channel ORA_DISK_1: SPFILE restore fromautobackup complete

Finished restore at 23-MAY-12

RMAN>

3、恢複控制檔案

RMAN> restorecontrolfile from autobackup;

using channel ORA_DISK_1

channel ORA_DISK_1: control file restorefrom autobackup complete

outputfilename=/DBSoft/product/10.2.0/db_1/dbs/cntrlWWL.dbf

4、報錯資訊:

RMAN> sql 'alterdatabase mount';

sql statement: alter database mount

RMAN-00571:===========================================================

RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of sql command ondefault channel at 05/23/2012 18:51:31

RMAN-11003: failure during parse/executionof SQL statement: alter database mount

ORA-01103: database name 'WWL' in controlfile is not 'DUMMY'

RMAN> alterdatabase mount;

RMAN-03002: failure of alter db command at05/23/2012 18:39:47

SQL> alterdatabase mount;

alter database mount

ERROR at line 1:

注意:問題是我恢複的控制檔案沒有錯呀,在本機器上也沒有部署過DUMMY的資料庫呀,隻有一個執行個體是WWL。

查詢執行個體資訊,執行個體資訊顯示沒有錯呀是WWL。

SQL> selectinstance_name,status from v$instance;

INSTANCE_NAME    STATUS

---------------- ------------

WWL              STARTED

      ----順便執行了下mount database;

*

奇怪的事發生了,現在再次登入到RMAM居然連接配接到的是DUMMY庫:

問題是,我确定沒有這個庫呀,怎麼辦。。。

[oracle@wwldb dbs]$rman target /

Recovery Manager: Release 10.2.0.1.0 -Production on Wed May 23 19:01:09 2012

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

connected to target database: DUMMY (notmounted)

RMAN> exit     

我們剛才做了參數檔案和控制檔案的恢複,要不将資料庫重新開機下,看有沒有問題。

SQL> shutdownimmediate

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> startupmount;

ORACLE instance started.

Total System Global Area  285212672 bytes

Fixed Size                  1218968 bytes

Variable Size              79693416 bytes

Database Buffers          197132288 bytes

Redo Buffers                7168000 bytes

Database mounted.

再次登入正常。

Recovery Manager: Release 10.2.0.1.0 -Production on Wed May 23 19:04:15 2012

connected to target database: WWL(DBID=5520179, not open)

   這個問題我一兄弟在AIX,Linux,Windows

上分别做實驗了,結果是在Windows下不用重新開機資料庫,Rman就可以認到,而不會是DUMMY資料庫。