Home » RDBMS Server » Backup & Recovery » RMAN Duplicate & ORA-01152 (Oracle 9i, 9.2.0.4, RHEL4 32bit)
RMAN Duplicate & ORA-01152 [message #315329] Mon, 21 April 2008 02:27 Go to next message
milhouse23
Messages: 5
Registered: April 2008
Junior Member
Hello.

Ok, I have kind of a weired problem and are really starting to loose it about it.
I tried to pull up a test environment from our production database. I wanted to use RMAN duplicate. So this is what I did:
1.) I made a full (incremental level 0) backup from my production database and copied it to the test server. My command for this in rman:

rman << EOF
connect target /;
run {
allocate channel d1 type disk;
allocate channel d2 type disk;
setlimit channel d1 kbytes 2097150 maxopenfiles 32;
setlimit channel d2 kbytes 2097150 maxopenfiles 32;
backup incremental level 0 database
plus archivelogs format '/u02/rman10g/backup/INC0_PROD_%s_%p_%t'
tag = 'WHOLE_INC0';

release channel d1;
release channel d2;
}

EOF


Next step is I copied the init.ora file of my instance to the test server and modified it, including db_file_name_rename and log_file_name_rename (I have not the same database name nor the same file structure). I created the directory structure.

Then I run my duplicate as follows on the test server. I figured out the sequence# from the last baackup archive from v$backup_redolog:

rman << EOF
connect target sys/passwd@prod
connect auxiliary /;
run
{
set until sequence XXX;
allocate auxiliary channel d1 type disk;
duplicate target database to 'TEST' nofilenamecheck;
}



Everythin runs fine. The restore completes, but after the recovery when rman tries to open the database with the resetlogs option I get an ORA-01152:

File system01.dbf was not restored from a sufficiently old backup.

I really have no clue, what is wrong with my concept...

Thanks a lot for your help.

Best,

milhouse
Re: RMAN Duplicate & ORA-01152 [message #315330 is a reply to message #315329] Mon, 21 April 2008 02:31 Go to previous messageGo to next message
gopu_g
Messages: 54
Registered: March 2008
Location: mumbai
Member


Cause: An incomplete recovery session was started, but an insufficient number of logs were applied to make the database consistent. This file is still in the future of the last log applied. The most likely cause of this error is forgetting to restore the file from a backup before doing incomplete recovery.
Action: Either apply more logs until the database is consistent or restore the database file from an older backup and repeat recovery.
Re: RMAN Duplicate & ORA-01152 [message #315332 is a reply to message #315330] Mon, 21 April 2008 02:40 Go to previous messageGo to next message
milhouse23
Messages: 5
Registered: April 2008
Junior Member
Well, this is the Oracle answer, which I already know. But I really don't get how this is possible. I make a duplicate from a freshly made incremental level0 backup? How can my restored datafile #1 be not consistent after the recovery?

Thanks,

Milhouse
Re: RMAN Duplicate & ORA-01152 [message #315333 is a reply to message #315332] Mon, 21 April 2008 03:00 Go to previous messageGo to next message
milhouse23
Messages: 5
Registered: April 2008
Junior Member
To be more precise, here the complete ERROR:
channel d1: restore complete

starting media recovery

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u00/oracle/oradata/TEST/system01.dbf'

released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/21/2008 09:54:36
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 11159 scn 386442526 found to restore


Re: RMAN Duplicate & ORA-01152 [message #315339 is a reply to message #315333] Mon, 21 April 2008 03:43 Go to previous messageGo to next message
gopu_g
Messages: 54
Registered: March 2008
Location: mumbai
Member

Online redo logs that are not current are lost, but CATALOGED
archived logs with the same seq# are ON DISK.

What version of the database & catalog are you using?

Do you see these archive logs when you do a:


RMAN> list copy of archivelog all;
Re: RMAN Duplicate & ORA-01152 [message #315346 is a reply to message #315339] Mon, 21 April 2008 04:08 Go to previous messageGo to next message
milhouse23
Messages: 5
Registered: April 2008
Junior Member
Hello.

Actually that happend to me on 9i (9.2.0.4) and on 10gR2 with different production databases.
For the mentioned example I did not use a catalog, but just the controlfile. I do see the archive logs when I do a
RMAN> list copy of archivelog all;
Particulary, I find the error message disturbing, because it sounds like I am trying to restore/recover my database to a point-in-time before my last backup was taken, doesn't it?
Just to make things clear. I used v$backup_redolog directly after the backup to get the sequence# of the last backed-up archive log. When I do an duplicate with the 'until sequence' clause, it should not need any of the online redos but only the archives that ARE included in my backup-set. Or am I just completely wrong?

Thanks,

milhouse
Re: RMAN Duplicate & ORA-01152 [message #315370 is a reply to message #315346] Mon, 21 April 2008 05:34 Go to previous messageGo to next message
gopu_g
Messages: 54
Registered: March 2008
Location: mumbai
Member

RMAN will take the backups of archivelog only it does't go for the redolog's.
when you do this command

RMAN> list copy of archivelog all;


If these showas EXPIRED ??
Re: RMAN Duplicate & ORA-01152 [message #315421 is a reply to message #315370] Mon, 21 April 2008 07:55 Go to previous message
milhouse23
Messages: 5
Registered: April 2008
Junior Member
No, they are not expired.
Previous Topic: Migration question about using archivelog files
Next Topic: Backup of Archive log files
Goto Forum:
  


Current Time: Thu May 09 19:26:49 CDT 2024