Oracle數(shù)據(jù)庫(kù)教程:ORA-01103錯(cuò)誤解析 |
發(fā)布時(shí)間: 2012/7/30 17:06:07 |
這是一測(cè)試庫(kù),我將參數(shù)文件,控制文件,數(shù)據(jù)文件全部刪除之后,做數(shù)據(jù)恢復(fù),但是 我把控制文件和參數(shù)文件都恢復(fù)回來(lái)了,可數(shù)據(jù)庫(kù)卻怎么也打不開,報(bào)ORA-01103: database name 'WWL' in control file is not 'DUMMY'錯(cuò)誤 我的數(shù)據(jù)庫(kù)名稱是:WWL 2、執(zhí)行過(guò)程: 恢復(fù)參數(shù)文件: 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、恢復(fù)控制文件 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、報(bào)錯(cuò)信息: 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'
注意:?jiǎn)栴}是我恢復(fù)的控制文件沒有錯(cuò)呀,在本機(jī)器上也沒有部署過(guò)DUMMY的數(shù)據(jù)庫(kù)呀,只有一個(gè)實(shí)例是WWL。
查詢實(shí)例信息,實(shí)例信息顯示沒有錯(cuò)呀是WWL。 SQL> selectinstance_name,status from v$instance;
INSTANCE_NAME STATUS ---------------- ------------ WWL STARTED
SQL> alterdatabase mount; ----順便執(zhí)行了下mount database; alter database mount * ERROR at line 1: ORA-01103: database name 'WWL' in controlfile is not 'DUMMY'
奇怪的事發(fā)生了,現(xiàn)在再次登錄到RMAM居然連接到的是DUMMY庫(kù): 問(wèn)題是,我確定沒有這個(gè)庫(kù)呀,怎么辦。。。
[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 我們剛才做了參數(shù)文件和控制文件的恢復(fù),要不將數(shù)據(jù)庫(kù)重啟下,看有沒有問(wèn)題。 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)
這個(gè)問(wèn)題我一兄弟在AIX,Linux,Windows 上分別做實(shí)驗(yàn)了,結(jié)果是在Windows下不用重啟數(shù)據(jù)庫(kù),Rman就可以認(rèn)到,而不會(huì)是DUMMY數(shù)據(jù)庫(kù)。 interval => 'trunc(sysdate,'HH')+1/24' C,一個(gè)小時(shí)后執(zhí)行 interval => 'sysdate+1/24' 本文出自:億恩科技【xuefeilisp.com】 服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |