Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

****************Got the opportunity to pen a Book on Database Cloud Services.......More details to follow.***************

Title : Database Cloud Revealed
Publisher : Apress
Release Date : Jan-2020

**********************************************************************************


My Cloud Certifications:

AWS Certified Solutions Architect Associate

Azure Certified Architect

Azure Certified Administrator

Oracle Cloud Infrastructure 2018 Certified Architect Associate.

Oracle Cloud Infrastructure Classic 2018 Certified Architect Associate.

Oracle Database Cloud Administrator Certified Professional.

Oracle Database Cloud Service Operations Certified Associate.

Search This Blog

Tuesday, August 7, 2012

RMAN-06457 UNTIL SCN is ahead of last SCN in archived logs


#!/bin/ksh

export ORACLE_SID=OIDTEST

rman msglog restore_OIDTEST.log append<< EOF
connect target sys/@OID
connect auxiliary /
run
{
allocate auxiliary channel ch01 type disk;
allocate auxiliary channel ch02 type disk;
allocate auxiliary channel ch03 type disk;
allocate auxiliary channel ch04 type disk;
set until time "to_date('06-AUG-2012 10:00:00','DD-MON-YYYY HH24:MI:SS')";
duplicate target database to OIDTEST;
}
exit
EOF



RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/07/2012 11:12:13
RMAN-06457: UNTIL SCN (488979215) is ahead of last SCN in archived logs (486144524)



When I looked at the SCN's they all still reflecting the old chnages/date and my restore is trying to go beyond these SCN's.


SQL> select thread#, status, enabled, checkpoint_time, checkpoint_change# from v$thread;

   THREAD# STATUS ENABLED  CHECKPOIN CHECKPOINT_CHANGE#
---------- ------ -------- --------- ------------------
         1 OPEN   PUBLIC   03-AUG-12          486144524
         2 OPEN   PUBLIC   05-AUG-12          488215686
         3 OPEN   PUBLIC   04-AUG-12          486909043


Do a check point.

SQL> alter system checkpoint;

System altered.

SQL> select thread#, status, enabled, checkpoint_time, checkpoint_change# from v$thread;

   THREAD# STATUS ENABLED  CHECKPOIN CHECKPOINT_CHANGE#
---------- ------ -------- --------- ------------------
         1 OPEN   PUBLIC   07-AUG-12          490100101
         2 OPEN   PUBLIC   07-AUG-12          490100101
         3 OPEN   PUBLIC   07-AUG-12          490100100


Now check what you have in the v$log. If they still reflect the old Change#'s then switch logfiles until all the threads are changed.




SQL> alter system switch logfile;

System altered.



SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.


SQL>  alter system switch logfile;

System altered.

SQL>  alter system switch logfile;

System altered.


SQL>

Restart the duplication process..happy duplicating..

3 comments:

Anonymous said...

thanks. It worked.

Anonymous said...

I tried this method, but still getting the same error. Can you help me please.

DBA said...

Thank you. It worked great.