1. symptom:
An error is reported when the database is opened in the last step after the recovery of the data files from different hosts is successful. For example:
SQL> alter database open resetlogs;
Error:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u02/Oracle/oradata/mingya/system01.dbf'
2. cause:
The cause of this error is that the scn recorded in controlfile is inconsistent with the scn in datafile, resulting in database startup failure.
3. Solution
3.1 determine the achivelog to be restored
Start the database to the mount status;
$ Rman target/catalog rman/rman @ catalog; Connect to RMAN
RMAN> recover database;
After running the command, RMAN will report an error and list the required archivelog at the end. For example:
RMAN-06025: no backup of log thread 1 seq 3784 lowscn 82847939 found to restore
RMAN-06025: no backup of log thread 1 seq 3783 lowscn 82845664 found to restore
3783 and 3784 are the archivelog to be restored.
3.2 restore the required archivelog from the tape library backup
RMAN> run {
2> set archivelog destination to '/u03/oracle/archivelog'. This path is set based on the actual path of the archived log.
3> allocate channel ch00 type 'sbt _ TAPE ';
4> send 'nb _ ORA_SERV = BAKSERV, NB_ORA_CLIENT = HOSTA ';
5> restore archivelog sequence between 3783 and 3784;
6> release channel ch00;
7>}
After the restoration is successful, the files 3783 and 3784 are displayed in the/u03/oracle/archivelog directory.
3.3 apply archivelog
RMAN> run {
2> allocate channel ch00 type disk;
3> set until sequence 3785 thread 1; 3785 is the maximum size 3784 + 1 to be restored
4> recover database;
5> release channel ch00;
6>}
3.4 open a database
RMAN> alter database open resetlogs;
So far, the database can be opened normally. To enable other clients to connect to the database, it is best to re-create listener. ora for listening, and reconfigure tnsnames. ora for other clients.
4. Other problems-ORA-19625 error resolution
After the recovery operation is successful on the test machine, the following error may occur when the production host is backed up with NBU:
RMAN-00569: ==================== error message stack follows ==========================
RMAN-03002: failure of backup command at 09/02/2009 02:21:47
ORA-19625: error identifying file/u03/oracle/archivelog/2009_08_31/4153783_634497921.dbf
=== Ended in error on Wed Sep 2 02:21:48 CST 2009 ====
In this case, you need to perform the following operations:
Log on to the host that runs normally:
$ Rman target/catalog rman/rman @ catalog
RMAN> crosscheck archivelog all;
Recommended reading:
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption