Oracle資料庫教程:ORA-01103錯誤解析

來源:互聯網
上載者:User

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;

 

Starting restore at 23-MAY-12

using channel ORA_DISK_1

 

channel ORA_DISK_1: looking for autobackupon day: 20120523

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

channel ORA_DISK_1: control file restorefrom autobackup complete

output filename=/DBSoft/product/10.2.0/db_1/dbs/cntrlWWL.dbf

Finished restore at 23-MAY-12

 

RMAN>

 

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;

using target database control file insteadof recovery catalog

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

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

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

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

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

 

SQL> alterdatabase mount;

alter database mount

 

ERROR at line 1:

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

 

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

 

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

SQL> selectinstance_name,status from v$instance;

 

INSTANCE_NAME    STATUS

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

WWL              STARTED

 

SQL> alterdatabase mount;       ----順便執行了下mount database;

alter database mount

*

ERROR at line 1:

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

 

奇怪的事發生了,現在再次登入到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.

再次登入正常。

[oracle@wwldb dbs]$rman target /

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

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

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

這個問題我一兄弟在AIX,Linux,Windows 上分別做實驗了,結果是在Windows下不用重啟資料庫,Rman就可以認到,而不會是DUMMY資料庫。

B,每小時執行一次,整點執行

interval => 'trunc(sysdate,'HH')+1/24'

C,一個小時後執行

interval => 'sysdate+1/24'

更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.