遭遇ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/../../raw12'[@more@]
造成這種報錯的大部分原因是因為controlfile裡所記錄的scn與datafile裡的scn不一致。比如從備份裡restore出的controlfile上的scn < datafile上所記錄的scn,因此理論上二種思路:
1、以old controlfile為準的,datafile上的scn是新的,這樣存在著資料的不一致,要繼續恢復下去,將datafile上的scn也要restore到與controlfile一致的情況,但這樣會丟失datafile上的資料。
2、就是以datafile上的scn為基準,將controlfile恢復到與datafile scn一致。
於是,在restore過後如果遭遇到ORA-01152之類的問題,可以這樣來操作(實際上就是上面第二種思路的實現):
RMAN>RECOVER DATABASE; ---找出同步controlfile scn和datafile scn所需的archivelog,如果歸檔目錄缺少所列出log就從備份裡(比如說是在磁帶裡)取出來並放回歸檔目錄,比如說所列的archivelog是1_215.dbf - 1_230.dbf。
然後進行時間點的資料恢復(大於之前所需archivelog中的最後一個archivelog即可)
RMAN>run{
allocate channel d1 type disk;
allocate channel d2 type disk;
set until sequence 231 thread 1; --注意這裡指定為1_231,大於之前的1_230
recover database;
release channel d1;
release channel d2;
}
這樣就恢復出一致性的資料,然後用open resetlogs開啟資料即可,但記得resetlogs後應該全備一次當前資料庫。當然,如果不願意用resetlogs後,重建controlfile後,用noresetlogs也是ok的。
此方法同樣適合於RAC資料庫的恢復測試時遇到的ORA-01152錯誤。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14517718/viewspace-1007797/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-01152: file 1 was not restored from a sufficiently old backupREST
- rman恢復時ORA-01152: file 1 was not restored from a sufficiently old backupREST
- 群友問題之ORA-01152: file 1 was not restored from a sufficiently old backupREST
- Export/import Datas To/from a Csv FileExportImport
- Move datafile:From File System to ASMASM
- Move datafile:From ASM to File SystemASM
- It is indirectly referenced from required .class fileUI
- Oracle 11GR2 Duplicate from BackupOracle
- How to restore and recover a database from an RMAN backup_881395.1RESTDatabase
- Unreal: Dynamic load map from Pak fileUnreal
- Catalog archivelog from file system to Asmdg;HiveASM
- Unload data to a flat file from Oracle databaseOracleDatabase
- recover database using backup control fileDatabase
- ORA-00245:control file backup failed;targetis likely on local file systemAI
- ORA-00245: control file backup failed; target is likely on a local file systemAI
- 高手sos!!! Unable to load document from file...
- /usr/share/mysql/czech/errmsg.sys from *** conflicts with file from package **MySqlPackage
- How to copy a datafile from ASM to a file system not using RMANASM
- ORA-01207: old control file完全解決方案
- ORA-00245: control file backup operation failedAI
- PG 資料庫遭遇 pg_clog file missing 故障.資料庫
- DUPLICATE (Backup based) DATABASE from non ASM to ASM to different host_382669.1DatabaseASM
- FROM ASM Migrating to FILE SYSTEM Using RMAN(三)ASM
- 【ORACLE】ORA-00245: control file backup operation failedOracleAI
- Out With the Old and in With the New
- 通過DUMP檔案頭來觀察FILE OFFLINE,TABLESPACE OFFLINE,HOT BACKUP的區別(1)
- Case two -- Recover a datafile in primary site from the backup taken in standby site without using c
- [old]wireless筆記筆記
- Unable to read TLD "META-INF/c.tld" from JAR fileJAR
- Sqoop1 From PostgreSQL to HdfsOOPSQL
- Case One -- Recover a datafile in primary site from the backup taken in standby site using catalog d
- ORA-01152解決
- "log file sync"等待事件-1事件
- xtts from檔案系統到ASM儲存(dbms_file_transfer)TTSASM
- [Util] can not load library from so file +++ errCode:10004
- IMPSHOW2SQL - Extracting SQL from an EXPORT file (Doc ID 29765.1)SQLExport
- TECH: Getting a Stack Trace from a CORE file on Unix (Doc ID 1812.1)
- 【oracle】ORA-01580 error creating control backup fileOracleError