Forum Stats

  • 3,824,997 Users
  • 2,260,452 Discussions
  • 7,896,379 Comments

Discussions

How to find correct SCN for RMAN duplicate

Setup:

=> location of RMAN backup files known

=> RMAN files should include archivelogs, datafiles, spfile and controlfile

=> Duplicate without target (duplicate database to testdb1....)

=> these are monthly backups with files located in date specific folders (ie., ../monthly/2020_10_01)

=> assume i don't have an RMAN output log of the backup taken to find the datetime to use


Scenario:

=> How do I determine the best SCN (or datetime) to use so for the RMAN duplicate using the RMAN backup files known

=> I'm assuming (and tried) I would need to restore a controlfile from the RMAN files. They are tagged with CTRL_xxx, but is there another way to make sure i'm using the right controfile to restore. Perhaps looking at the last set of files and just running "restoring controlfile from ..." and see what happens

=> After restoring controlfile, what's the best way to determine which SCN to use.  

  - As an example, i reviewed a successful RMAN duplicate from backup location with no SCN or datetime and noticed it choose to restore a controlfile from a non CTRL_xxx filename (not sure what happened in our backup script there) and then noticed the SCN the RMAN dup used. I tried running some queries to determine why it choose that SCN based on some other things people have put out there on the interweb to get this number, to no avail.

  - when I just did a database preview from the restored controlfile, the results came back with daily and monthly files, which are a big problem because the daily files roll off after 30 days.


I can provide more details as questions come.

thanks all who reply.

Answers

  • Luís Gustavo Lira
    Luís Gustavo Lira Member Posts: 119 Silver Badge

    Hi @user9536198,

    I don't know if I understood very well, but I think the question is how to get information about backups without verifing the execution logs.

    If so, I would suggest you to use the list backup command from rman.

    E.g.

    RMAN> 

    LIST BACKUP OF CONTROLFILE;

    LIST BACKUP OF DATABASE;

    LIST BACKUP OF ARCHIVELOG ALL;

    LIST BACKUP COMPLETED BETWEEN 'SYSDATE -1' AND 'SYSDATE';