1

Oracle 11.2.0.3 with daily full backup and hourly archivelog backup. RMAN with a catalog.

If I take a backup at 11pm at night and it finishes 5am the next day and I want to restore a backup to a different system, how can I identify either a time for 'set until' or an SCN that will require the least amount of archivelogs to be replayed? 11pm? After 5am? RMAN is my least understood part of the database.

1
  • Not sure what the question means, if you install the latest backup you need the least amount of additional archivelogs to catch up with current state, right?
    – eckes
    Nov 15, 2018 at 11:56

3 Answers 3

1

I have a weekly script that automates a duplicate from prod backup. WHen I inherited it, it did a duplicate until time and was highly dependent on jobs completing on schedule so it could assume a good 'until time'. I modified it to get a good scn and so duplicate 'until scn'. I get the scn with this snippet of code querying the rman catalog, in a shell script. If you are on windows, you'll need to adjust scripting technique, but principle is the same:

    # 2. Get the scn from the most recent archlog backup

#

rcvryscn=$(sqlplus -s rman/pwd@rmcat <<EOF

set echo off feedback off verify off trimsp on head off

col maxscn for 9999999999999999

select max(first_change#) maxscn

from rc_backup_archivelog_details a

join rc_database d on a.db_key=d.db_key

where d.dbid=$dwprdid;

EOF

)
0

My RMAN script backs up the control file first, then all of the data files, then the archive log files. If you know when time the data files are done getting backed up and added 20 minutes for cushion, you could use that as a set until time. Hence, you would have the least amount of redo being applied. Ideally you have the archive logs available to the cloned database, so that you can roll forward the changes that are needed. Do you know how many archive logs are creating during the backup of the data files?

0

... how can I identify either a time for 'set until' or an SCN that will require the least amount of archivelogs to be replayed?

Why does that matter?

Unless you have a very unusual application, the amount of Redo Logs to be re-applied will be minimal compared to the size of the Data Files you are restoring. You're not going to reduce the overall restore time by much at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.