Question

RMAN error

  • 21 January 2022
  • 8 replies
  • 397 views

Userlevel 5
Badge +10
  • Sidekick (Customer)
  • 107 replies

While trying to restore the test db using the prod database i am getting an error like this “RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2963 and starting SCN of 17671820486”. I checked for the old archieve logs in Prod they are not available . How to overcome this.


This topic has been closed for comments

8 replies

Userlevel 6
Badge +14

Hello Arif,

 

I found this online:

https://www.veritas.com/support/en_US/article.100012517

Thanks,

JL

Userlevel 6
Badge +14

Hello @m.arif 

 

Did you fix the issue?

Badge +15

@m.arif 

Please check whether below article will be useful 

https://dba.stackexchange.com/questions/7498/rman-06054-media-recovery-requesting-unknown-archived-log-where-is-scn-kept

Userlevel 5
Badge +10

Thanks @ZTC ZTC JGOTA  AND @Manoj Ruwanhewa  , our partner DBA says it can be due to several reasons in installing the database. i am trying to reinstall and check again.

Userlevel 5
Badge +10

i tried all the options to restore it but none worked. request @Sajith D  to please help.

Userlevel 7
Badge +21

Hi @m.arif ,

Can you share the script you are using to duplicate prod to test? Missing archive log messages tend to point to an inconsistent backup but based on how you are trying to duplicate RMAN should be able to pull the required changes from production on the go unless you are using “no target” method.

Cheers 

Userlevel 5
Badge +10

thanks @Sajith D , please find below the backup and restore scripts.

[CODE]

Backup script

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE BACKUP OPTIMIZATION OFF;

CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET; 

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\BACKUP\RMAN\Backup\PROD_2022-01-26\%F';

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\BACKUP\RMAN\Backup\PROD_2022-01-26\%U' MAXPIECESIZE = 10G;

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;

CROSSCHECK ARCHIVELOG ALL;

DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-2';

CROSSCHECK BACKUPSET;

CROSSCHECK ARCHIVELOG ALL;

BACKUP DATABASE PLUS ARCHIVELOG;

DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 2 DAYS DEVICE TYPE DISK;

 

 

Restore script

DUPLICATE DATABASE TO 'TSTCDB' BACKUP LOCATION 'F:\BackupRestore\BackupFiles' NOFILENAMECHECK

[/CODE]

 

Kindly advice , how can i restore the db from prod by creating a new instance , we are struggling.

Regards

 

Arif

 

Userlevel 7
Badge +21

Hi @m.arif,

It’s possible that you are having an issue with the creating the redo logs in the auxiliary instance and the archive log message is a result of that. Can you see whether you can use the following duplicate script instead? Please change the database and folder paths to suit your environment. 

RUN
{
  DUPLICATE DATABASE TO 'TESTCDB' BACKUP LOCATION 'D:\BackupRestore\BackupFiles' NOFILENAMECHECK
  DB_FILE_NAME_CONVERT='D:\oradata\PRODCDB\','D:\oradata\TESTCDB\'
    LOGFILE
      GROUP 1 (
    'D:\oradata\TESTCDB\REDO011.LOG',
    'D:\oradata\TESTCDB\REDO012.LOG' ) SIZE 100M REUSE,
  GROUP 2 (
    'D:\oradata\TESTCDB\REDO021.LOG',
    'D:\ORADATA\TESTCDB\REDO022.LOG' ) SIZE 100M REUSE,
  GROUP 3 (
    'D:\oradata\TESTCDB\REDO031.LOG',
    'D:\oradata\TESTCDB\REDO032.LOG' ) SIZE 100M REUSE;
}

 

Additionally, it’s probably worth removing the “DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-2';” from your backup script. Since you are already defining a recovery window and has the optimization off as you should, “DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 2 DAYS DEVICE TYPE DISK;” would take care of the housekeeping honoring the recovery window.

Cheers.