ORA-01152 故障解決
今天在測試庫上做RMAN備份恢復實驗時,open resetlogs階段出現了錯誤:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/dbp/system01.dbf'
突然想起以前在此庫做過一個RMAN configuration(備份時exclude system tablespace),應該是因此恢復時才會提示報錯。
如下恢復步驟:
set DBID
restore spfile from.
restore controlfile from.
RMAN> restore database;
Starting restore at 29-MAR-12
using channel ORA_DISK_1
using channel ORA_DISK_2
file 7 is excluded from whole database backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/29/2012 14:16:17
RMAN-06026: some targets not found - aborting restore
file 7 is excluded from whole database backup
restore not done;
從此處可以看出,實際上restore 就沒有完成。
RMAN>
run{
set until scn 61182896;
restore database;
restore archivelog all;
recover database;
alter database open resetlogs;}
……………………………………………………………………
allocated channel: c1
channel c1: sid=13 devtype=DISK
Starting restore at 02-AUG-05
released channel: c1
…………………………………………………………
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/29/2012 15:50:21
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/dbp/system01.dbf'
RMAN> list incarnation ;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 DBP 1761361519 PARENT 1 17-FEB-08
2 2 DBP 1761361519 PARENT 464631 21-JUN-10
3 3 DBP 1761361519 PARENT 579893 28-JUN-10
4 4 DBP 1761361519 PARENT 1116645 14-AUG-10
5 5 DBP 1761361519 CURRENT 1117950 14-AUG-10
6 6 DBP 1761361519 ORPHAN 19093809 04-JAN-12
7 7 DBP 1761361519 ORPHAN 61604278 26-MAR-12
當restore 單個datafile 時,也有報錯
ORA-01178: file 7 created before last CREATE CONTROLFILE, cannot recreate
解決方法:重建控制檔案
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> SQL> SQL>
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1271616 bytes
Variable Size 297797824 bytes
Database Buffers 767557632 bytes
Redo Buffers 7114752 bytes
SQL>CREATE CONTROLFILE REUSE DATABASE "DBP" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/opt/oracle/oradata/dbp/redo01.log' SIZE 50M,
GROUP 2 '/opt/oracle/oradata/dbp/redo02.log' SIZE 50M,
GROUP 3 '/opt/oracle/oradata/dbp/redo03.log' SIZE 50M
DATAFILE
'/opt/oracle/oradata/dbp/system01.dbf',
'/opt/oracle/oradata/dbp/undotbs01.dbf',
'/opt/oracle/oradata/dbp/sysaux01.dbf',
'/opt/oracle/oradata/dbp/users01.dbf',
'/opt/oracle/oradata/dbp/TOSS_WAPS_DATA.dbf',
'/opt/oracle/oradata/dbp/waps_data1.dbf',
'/opt/oracle/oradata/dbp/waps_data3.dbf'
19 ;
Control file created.
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 61718297 generated at 03/29/2012 10:57:31 needed for thread 1
ORA-00289: suggestion : /opt/oracle/flash_recovery_area/1_12_778932065.dbf
ORA-00280: change 61718297 for thread 1 is in sequence #12
Specify log: {=suggested | filename | AUTO | CANCEL}
connected.
SQL> startup force
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1271616 bytes
Variable Size 297797824 bytes
Database Buffers 767557632 bytes
Redo Buffers 7114752 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/dbp/system01.dbf'
突然想起以前在此庫做過一個RMAN configuration(備份時exclude system tablespace),應該是因此恢復時才會提示報錯。
如下恢復步驟:
set DBID
restore spfile from.
restore controlfile from.
RMAN> restore database;
Starting restore at 29-MAR-12
using channel ORA_DISK_1
using channel ORA_DISK_2
file 7 is excluded from whole database backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/29/2012 14:16:17
RMAN-06026: some targets not found - aborting restore
file 7 is excluded from whole database backup
restore not done;
從此處可以看出,實際上restore 就沒有完成。
RMAN>
run{
set until scn 61182896;
restore database;
restore archivelog all;
recover database;
alter database open resetlogs;}
……………………………………………………………………
allocated channel: c1
channel c1: sid=13 devtype=DISK
Starting restore at 02-AUG-05
released channel: c1
…………………………………………………………
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/29/2012 15:50:21
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/opt/oracle/oradata/dbp/system01.dbf'
RMAN> list incarnation ;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 DBP 1761361519 PARENT 1 17-FEB-08
2 2 DBP 1761361519 PARENT 464631 21-JUN-10
3 3 DBP 1761361519 PARENT 579893 28-JUN-10
4 4 DBP 1761361519 PARENT 1116645 14-AUG-10
5 5 DBP 1761361519 CURRENT 1117950 14-AUG-10
6 6 DBP 1761361519 ORPHAN 19093809 04-JAN-12
7 7 DBP 1761361519 ORPHAN 61604278 26-MAR-12
當restore 單個datafile 時,也有報錯
ORA-01178: file 7 created before last CREATE CONTROLFILE, cannot recreate
解決方法:重建控制檔案
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> SQL> SQL>
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1271616 bytes
Variable Size 297797824 bytes
Database Buffers 767557632 bytes
Redo Buffers 7114752 bytes
SQL>CREATE CONTROLFILE REUSE DATABASE "DBP" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/opt/oracle/oradata/dbp/redo01.log' SIZE 50M,
GROUP 2 '/opt/oracle/oradata/dbp/redo02.log' SIZE 50M,
GROUP 3 '/opt/oracle/oradata/dbp/redo03.log' SIZE 50M
DATAFILE
'/opt/oracle/oradata/dbp/system01.dbf',
'/opt/oracle/oradata/dbp/undotbs01.dbf',
'/opt/oracle/oradata/dbp/sysaux01.dbf',
'/opt/oracle/oradata/dbp/users01.dbf',
'/opt/oracle/oradata/dbp/TOSS_WAPS_DATA.dbf',
'/opt/oracle/oradata/dbp/waps_data1.dbf',
'/opt/oracle/oradata/dbp/waps_data3.dbf'
19 ;
Control file created.
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 61718297 generated at 03/29/2012 10:57:31 needed for thread 1
ORA-00289: suggestion : /opt/oracle/flash_recovery_area/1_12_778932065.dbf
ORA-00280: change 61718297 for thread 1 is in sequence #12
Specify log: {
connected.
SQL> startup force
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1271616 bytes
Variable Size 297797824 bytes
Database Buffers 767557632 bytes
Redo Buffers 7114752 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/628922/viewspace-719862/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-01152解決
- NFS故障解決NFS
- 故障解決法(摘抄)
- 徹底解決rman恢復碰到ora-01152錯
- 異機恢復後ORA-01152錯誤解決
- 【故障解決】OGG-00446 錯誤解決
- 【故障解決】enq: PS - contentionENQ
- metalink登陸故障解決!
- 【故障解決】IPCS和IPCRM使用
- 【故障解決】ORA-06502錯誤解決
- 常見硬碟故障大全 硬碟故障解決辦法大全硬碟
- 解決docker: Error response from daemon故障DockerError
- Sentinel哨兵模式解決故障轉移模式
- 【Spark篇】---Spark故障解決(troubleshooting)Spark
- ORA-10873 故障解決
- Dataguard日常維護及故障解決
- TSM故障問題解決一則
- 解決儲存硬碟故障一則硬碟
- 兩個系統故障解決薦
- 【故障-ORACLE】OSWBB不能執行解決Oracle
- linux 故障解決方法彙總Linux
- 解決DNS解析故障的幾種方法DNS
- ORA-12516故障解決
- DVR常見故障原因及解決方法VR
- Rownum分頁故障解決一例
- TSM無法備份故障解決(續)
- 從一次故障解決想到的
- goldengate 故障及解決方法彙總Go
- 一次ASM環境故障解決ASM
- ORA-01555故障解決案例
- 利用 Tmux 和 kubectl 解決 Kubernetes 故障UX
- 故障解決:埠已被佔用 1080
- Oracle ASM故障資料恢復解決方案OracleASM資料恢復
- fedora16無線網路卡故障解決
- 常見的光纖故障及其解決方案
- 網路卡常見故障及解決辦法
- mysql的三個故障解決小結薦MySql
- ubuntu 和VMWare共享資料時故障解決Ubuntu