Oracle 11g RMAN 異機恢復報錯 RMAN-06172、ORA-07202
Oracle 11g RMAN 異機恢復,恢復引數檔案的時候報錯。
RMAN> startup nomount
Oracle instance started
Total System Global Area 17103163392 bytes
Fixed Size 2245480 bytes
Variable Size 2181041304 bytes
Database Buffers 14898167808 bytes
Redo Buffers 21708800 bytes
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE SPFILE
TO PFILE '/u01/app/oracle/product/11.2.0/db_1/dbs/initaftdb.ora'
FROM AUTOBACKUP;
SHUTDOWN ABORT;
2> 3> 4> 5> 6> 7> 8> 9> }
allocated channel: c1
channel c1: SID=1072 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 24-FEB-16
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: no AUTOBACKUP in 7 days found
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/24/2016 15:52:07
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
報錯原因:
使用 FROM AUTOBACKUP 語句時,預設會搜尋7天內的備份資料,如果我們進行恢復的控制檔案超過了這個時間範圍,就會報錯。
解決辦法:
可以在語句上面指定 MAXDAYS 引數,將擴大搜尋的時間範圍,最大可以指定366天。
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE SPFILE
TO PFILE '/u01/app/oracle/product/11.2.0/db_1/dbs/initaftdb.ora'
FROM AUTOBACKUP MAXDAYS 30;
SHUT2> 3> 4> 5> 6> 7> 8> DOWN ABORT;
}9>
allocated channel: c1
channel c1: SID=1072 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 24-FEB-16
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: looking for AUTOBACKUP on day: 20160217
channel c1: AUTOBACKUP found: /oradata/bk/rman/c-1864798816-20160217-00
channel c1: restoring spfile from AUTOBACKUP /oradata/bk/rman/c-1864798816-20160217-00
channel c1: SPFILE restore from AUTOBACKUP complete
Finished restore at 24-FEB-16
Oracle instance shut down
--恢復控制檔案的時候報錯 ORA-07202
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE CONTROLFILE FROM AUTOBACKUP MAXDAYS 30;
ALTER DATABASE MOUNT;
}2> 3> 4> 5> 6> 7>
allocated channel: c1
channel c1: SID=1174 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 24-FEB-16
recovery area destination: /oradata/aftdb
database name (or database unique name) used for search: AFTDB
channel c1: no AUTOBACKUPS found in the recovery area
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: looking for AUTOBACKUP on day: 20160217
channel c1: AUTOBACKUP found: /oradata/bk/rman/c-1864798816-20160217-00
channel c1: restoring control file from AUTOBACKUP /oradata/bk/rman/c-1864798816-20160217-00
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/24/2016 17:28:38
ORA-07202: sltln: invalid parameter to sltln.
仔細檢視引數檔案,發現 db_recovery_file_dest 配置成資料檔案的上級目錄
*.control_files='/oradata/aftdb/controlfile/control01.ctl','/oradata/aftdb/controlfile/control02.ctl'
*.db_create_file_dest='/oradata/aftdb/data'
*.db_create_online_log_dest_1='/oradata/aftdb/log'
*.db_create_online_log_dest_2='/oradata/aftdb/log'
*.db_recovery_file_dest='/oradata/aftdb/'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oradata/aftdb/arc'
更改如下
*.control_files='/oradata/aftdb/controlfile/control01.ctl','/oradata/aftdb/controlfile/control02.ctl'
*.db_create_file_dest='/oradata/aftdb/data'
*.db_create_online_log_dest_1='/oradata/aftdb/log'
*.db_create_online_log_dest_2='/oradata/aftdb/log'
*.db_recovery_file_dest='/oradata/aftdb/recovery'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oradata/aftdb/arc'
使用新改正後的引數檔案重新啟動資料庫,報錯消失,正常恢復控制檔案。
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE CONTROLFILE FROM AUTOBACKUP MAXDAYS 30;
ALTER DATABASE MOUNT;
}2> 3> 4> 5> 6> 7>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=1174 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 25-FEB-16
recovery area destination: /oradata/aftdb/recovery
database name (or database unique name) used for search: AFTDB
channel c1: no AUTOBACKUPS found in the recovery area
channel c1: looking for AUTOBACKUP on day: 20160225
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: looking for AUTOBACKUP on day: 20160217
channel c1: AUTOBACKUP found: /oradata/bk/rman/c-1864798816-20160217-00
channel c1: restoring control file from AUTOBACKUP /oradata/bk/rman/c-1864798816-20160217-00
channel c1: control file restore from AUTOBACKUP complete
output file name=/oradata/aftdb/controlfile/control01.ctl
output file name=/oradata/aftdb/controlfile/control02.ctl
Finished restore at 25-FEB-16
database mounted
released channel: c1
RMAN> startup nomount
Oracle instance started
Total System Global Area 17103163392 bytes
Fixed Size 2245480 bytes
Variable Size 2181041304 bytes
Database Buffers 14898167808 bytes
Redo Buffers 21708800 bytes
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE SPFILE
TO PFILE '/u01/app/oracle/product/11.2.0/db_1/dbs/initaftdb.ora'
FROM AUTOBACKUP;
SHUTDOWN ABORT;
2> 3> 4> 5> 6> 7> 8> 9> }
allocated channel: c1
channel c1: SID=1072 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 24-FEB-16
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: no AUTOBACKUP in 7 days found
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/24/2016 15:52:07
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
報錯原因:
使用 FROM AUTOBACKUP 語句時,預設會搜尋7天內的備份資料,如果我們進行恢復的控制檔案超過了這個時間範圍,就會報錯。
解決辦法:
可以在語句上面指定 MAXDAYS 引數,將擴大搜尋的時間範圍,最大可以指定366天。
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE SPFILE
TO PFILE '/u01/app/oracle/product/11.2.0/db_1/dbs/initaftdb.ora'
FROM AUTOBACKUP MAXDAYS 30;
SHUT2> 3> 4> 5> 6> 7> 8> DOWN ABORT;
}9>
allocated channel: c1
channel c1: SID=1072 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 24-FEB-16
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: looking for AUTOBACKUP on day: 20160217
channel c1: AUTOBACKUP found: /oradata/bk/rman/c-1864798816-20160217-00
channel c1: restoring spfile from AUTOBACKUP /oradata/bk/rman/c-1864798816-20160217-00
channel c1: SPFILE restore from AUTOBACKUP complete
Finished restore at 24-FEB-16
Oracle instance shut down
--恢復控制檔案的時候報錯 ORA-07202
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE CONTROLFILE FROM AUTOBACKUP MAXDAYS 30;
ALTER DATABASE MOUNT;
}2> 3> 4> 5> 6> 7>
allocated channel: c1
channel c1: SID=1174 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 24-FEB-16
recovery area destination: /oradata/aftdb
database name (or database unique name) used for search: AFTDB
channel c1: no AUTOBACKUPS found in the recovery area
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: looking for AUTOBACKUP on day: 20160217
channel c1: AUTOBACKUP found: /oradata/bk/rman/c-1864798816-20160217-00
channel c1: restoring control file from AUTOBACKUP /oradata/bk/rman/c-1864798816-20160217-00
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/24/2016 17:28:38
ORA-07202: sltln: invalid parameter to sltln.
*.control_files='/oradata/aftdb/controlfile/control01.ctl','/oradata/aftdb/controlfile/control02.ctl'
*.db_create_file_dest='/oradata/aftdb/data'
*.db_create_online_log_dest_1='/oradata/aftdb/log'
*.db_create_online_log_dest_2='/oradata/aftdb/log'
*.db_recovery_file_dest='/oradata/aftdb/'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oradata/aftdb/arc'
更改如下
*.control_files='/oradata/aftdb/controlfile/control01.ctl','/oradata/aftdb/controlfile/control02.ctl'
*.db_create_file_dest='/oradata/aftdb/data'
*.db_create_online_log_dest_1='/oradata/aftdb/log'
*.db_create_online_log_dest_2='/oradata/aftdb/log'
*.db_recovery_file_dest='/oradata/aftdb/recovery'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oradata/aftdb/arc'
使用新改正後的引數檔案重新啟動資料庫,報錯消失,正常恢復控制檔案。
RMAN> RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/bk/rman/%F';
RESTORE CONTROLFILE FROM AUTOBACKUP MAXDAYS 30;
ALTER DATABASE MOUNT;
}2> 3> 4> 5> 6> 7>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=1174 device type=DISK
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 25-FEB-16
recovery area destination: /oradata/aftdb/recovery
database name (or database unique name) used for search: AFTDB
channel c1: no AUTOBACKUPS found in the recovery area
channel c1: looking for AUTOBACKUP on day: 20160225
channel c1: looking for AUTOBACKUP on day: 20160224
channel c1: looking for AUTOBACKUP on day: 20160223
channel c1: looking for AUTOBACKUP on day: 20160222
channel c1: looking for AUTOBACKUP on day: 20160221
channel c1: looking for AUTOBACKUP on day: 20160220
channel c1: looking for AUTOBACKUP on day: 20160219
channel c1: looking for AUTOBACKUP on day: 20160218
channel c1: looking for AUTOBACKUP on day: 20160217
channel c1: AUTOBACKUP found: /oradata/bk/rman/c-1864798816-20160217-00
channel c1: restoring control file from AUTOBACKUP /oradata/bk/rman/c-1864798816-20160217-00
channel c1: control file restore from AUTOBACKUP complete
output file name=/oradata/aftdb/controlfile/control01.ctl
output file name=/oradata/aftdb/controlfile/control02.ctl
Finished restore at 25-FEB-16
database mounted
released channel: c1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-1993939/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g RMAN 異機恢復Oracle
- Oracle RMAN異機恢復Oracle
- rman恢復方案和oracle異機恢復Oracle
- oracle的RMAN異機恢復Oracle
- ORACLE RMAN異機異目錄恢復Oracle
- Oracle 12c RMAN 異機恢復Oracle
- RMAN異機恢復總結
- oracle 11G r2 異機恢復Oracle
- oracle 異機恢復Oracle
- oracle10gR2之RMAN異機恢復案例Oracle
- oracle 10.2.0.1 win 32 rman 備份異機恢復Oracle
- rman之同平臺異機恢復
- Oracle 11g RMAN恢復-只讀表空間的恢復Oracle
- RMAN異機恢復:RAC到單例項單例
- 異機恢復RMAN-05517解決方法
- RMAN備份異機恢復流程總結
- oracle冷備份、恢復和異機恢復Oracle
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- RMAN異地恢復實戰
- RMAN資料庫恢復異常報錯ORA-01180資料庫
- 兩篇oracle異機恢復文章Oracle
- 初試Oracle的RMAN異地異系統恢復…………失敗…………Oracle
- RMAN異機恢復異作業系統(Linux到Windows)作業系統LinuxWindows
- Oracle備份恢復之熱備份恢復及異機恢復Oracle
- 資料庫異機恢復開啟報錯ORA-36961資料庫
- ORACLE 11.2.0.4 RAC RMAN異機恢復之ORA-15001Oracle
- 用 RMAN 備份異機恢復 遷移資料
- oracle11gR2_64之rman異機恢復(FS->FS)完整案例Oracle
- oracle實驗記錄 (恢復-rman恢復)Oracle
- Oracle 11g RMAN恢復時報錯"RMAN-06100"、"RMAN-06026"、"RMAN-03002"Oracle
- 【北亞資料恢復】異常斷電導致Oracle資料庫報錯的oracle資料恢復資料恢復Oracle資料庫
- Oracle RMAN恢復測試Oracle
- Oracle rman 各種恢復Oracle
- rman 恢復機制與恢復測試
- 使用RMAN實現異機備份恢復(WIN平臺)
- standby全庫rman備份檔案恢復到異機
- G017-ORACLE-MIGRATION-01 RMAN備份異機不完全恢復Oracle
- ORACLE中採用rman備份異機恢復資料庫詳細過程Oracle資料庫