RMAN基於備份控制檔案恢復失敗
我做了個RMAN基於備份控制檔案恢復的測試,但最後datafile顯示MISSING00006不知是何原因,下面是測試步驟,請幫忙看看/
--先建立一個表空間,後面刪除並恢復它
SQL> create tablespace eric
2 datafile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\eric01.DBF'
3 size 10m;
Tablespace created.
C:\Documents and Settings\L5M>rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Feb 26 08:45:09 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: LISA (DBID=1171353837)
RMAN> configure controlfile autobackup on;
RMAN> backup database;
SQL> select to_char(sysdate,'yyyy-mm-dd:hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'YY
-------------------
2008-02-26:08:50:11
SQL> drop tablespace eric including contents and datafiles;
Tablespace dropped.
C:\Documents and Settings\L5M>set nls_date_format=yyyy-mm-dd hh24:mi:ss
C:\Documents and Settings\L5M>rman target /
RMAN> startup force nomount
RMAN> set dbid=1171353837
RMAN> restore controlfile from autobackup;
Starting restore at 2008-02-26 08:57:13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
recovery area destination: D:\oracle\product\10.2.0\admin\lisa\flash_recovery_ar
ea
database name (or database unique name) used for search: LISA
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: D:\ORACLE\PRODUCT\10.2.0\ADMIN\LISA\FLASH_
RECOVERY_AREA\LISA\AUTOBACKUP\2008_02_26\O1_MF_S_647686276_3W6RN4SW_.BKP
channel ORA_DISK_1: control file restore from autobackup complete
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\CONTROLFILE\CONTROL.CTL
Finished restore at 2008-02-26 08:57:19
RMAN> alter database mount;
RMAN> run {
2> set until time='2008-02-26 08:50:11';
3> restore database;
4> recover database;
5> sql 'alter database open resetlogs';
6> }
SQL> select ts#,name from v$datafile;
TS# NAME
---------- -----------------------------------------------------------------
0 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\SYSTEM01.DBF
1 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\UNDOTBS01.DBF
2 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\SYSAUX01.DBF
4 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\USERS01.DBF
4 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\USERS02.DBF
9 D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\MISSING00006
6 rows selected.
SQL> select ts#,name from v$tablespace;
TS# NAME
---------- -----------------------------------
0 SYSTEM
1 UNDOTBS1
2 SYSAUX
4 USERS
3 TEMP
9 ERIC
6 rows selected.
看得出來,表空間是恢復出來了,資料檔案應該恢復到'D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\eric01.DBF'。不知哪裡有問題,請大蝦們幫忙看看。
--先建立一個表空間,後面刪除並恢復它
SQL> create tablespace eric
2 datafile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\eric01.DBF'
3 size 10m;
Tablespace created.
C:\Documents and Settings\L5M>rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Feb 26 08:45:09 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: LISA (DBID=1171353837)
RMAN> configure controlfile autobackup on;
RMAN> backup database;
SQL> select to_char(sysdate,'yyyy-mm-dd:hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'YY
-------------------
2008-02-26:08:50:11
SQL> drop tablespace eric including contents and datafiles;
Tablespace dropped.
C:\Documents and Settings\L5M>set nls_date_format=yyyy-mm-dd hh24:mi:ss
C:\Documents and Settings\L5M>rman target /
RMAN> startup force nomount
RMAN> set dbid=1171353837
RMAN> restore controlfile from autobackup;
Starting restore at 2008-02-26 08:57:13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
recovery area destination: D:\oracle\product\10.2.0\admin\lisa\flash_recovery_ar
ea
database name (or database unique name) used for search: LISA
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: D:\ORACLE\PRODUCT\10.2.0\ADMIN\LISA\FLASH_
RECOVERY_AREA\LISA\AUTOBACKUP\2008_02_26\O1_MF_S_647686276_3W6RN4SW_.BKP
channel ORA_DISK_1: control file restore from autobackup complete
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\CONTROLFILE\CONTROL.CTL
Finished restore at 2008-02-26 08:57:19
RMAN> alter database mount;
RMAN> run {
2> set until time='2008-02-26 08:50:11';
3> restore database;
4> recover database;
5> sql 'alter database open resetlogs';
6> }
SQL> select ts#,name from v$datafile;
TS# NAME
---------- -----------------------------------------------------------------
0 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\SYSTEM01.DBF
1 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\UNDOTBS01.DBF
2 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\SYSAUX01.DBF
4 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\USERS01.DBF
4 D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\USERS02.DBF
9 D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\MISSING00006
6 rows selected.
SQL> select ts#,name from v$tablespace;
TS# NAME
---------- -----------------------------------
0 SYSTEM
1 UNDOTBS1
2 SYSAUX
4 USERS
3 TEMP
9 ERIC
6 rows selected.
看得出來,表空間是恢復出來了,資料檔案應該恢復到'D:\ORACLE\PRODUCT\10.2.0\ORADATA\LISA\DATAFILE\eric01.DBF'。不知哪裡有問題,請大蝦們幫忙看看。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271283/viewspace-195786/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 12 使用RMAN備份和恢復檔案
- dg丟失歸檔,使用rman增量備份恢復
- rman 增量備份恢復
- RMAN備份恢復技巧
- RMAN備份恢復典型案例——資料檔案存在壞快
- RMAN備份異機恢復
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- MySQL備份與恢復——基於Xtrabackup物理備份恢復MySql
- 【RMAN】Oracle中如何備份控制檔案?備份控制檔案的方式有哪幾種?Oracle
- RMAN備份恢復效能優化優化
- RMAN備份與恢復測試
- 【備份】RMAN中對控制檔案的幾種備份方法
- MySQL備份與恢復——基於MyDumper/MyLoader 邏輯備份恢復MySql
- rman備份的時候讀取v$session_longops失敗導致備份失敗SessionGo
- Oracle 備份恢復篇之RMAN catalogOracle
- ORACLE DG從庫 Rman備份恢復Oracle
- rman備份異機恢復(原創)
- RMAN備份恢復典型案例——異機恢復未知DBID
- 【RMAN】如果控制檔案損壞那麼如何恢復?恢復控制檔案的方式有哪幾種?
- rman恢復控制檔案的一個小錯誤
- MySQL備份與恢復——基於OUTFILE /LOAD DATA 邏輯備份恢復MySql
- RMAN備份恢復典型案例——ORA-00245
- XFS檔案系統的備份、恢復、修復
- 備份恢復Lesson 04.Using the RMAN Recovery Catalog
- Oracle-無備份情況下,如何手動恢復控制檔案Oracle
- 【RMAN】Oracle12c以後rman 備份恢復命令參考Oracle
- 【RMAN】在多租戶環境下的RMAN備份及恢復
- gitlab自動定時備份檔案,備份失敗傳送郵件Gitlab
- 透過RMAN備份standby database成功恢復還原Database
- RMAN備份恢復典型案例——資料庫卡頓資料庫
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- 透過搭建恢復目錄實現RMAN異地備份和恢復
- 檔案的基本管理和XFS檔案系統備份恢復
- Linux中XFS檔案系統的備份,恢復,修復Linux
- 如何從Active Backup for Business備份中恢復檔案
- 如何備份及恢復Linux檔案許可權Linux
- Oracle為什麼使用備份的控制檔案恢復後一定要resetlogsOracle
- RMAN-ERROR:因為找不到過期和丟失的歸檔日誌而備份失敗Error
- RMAN備份恢復典型案例——跨平臺遷移pdb