About

Martin Klier

usn-it.de

Oracle RMAN destination with variable restrains “not backed up” clause

Today I was a bit surprised – being always under the impression that Oracle RMAN should accept “backup backupset not backed up to destination ‘xyz'” AND work with it successfully. But I learned that in 11.2.0.4 the Oracle RMAN “to destination” containing variables restrains the “not backed up” clause. No error thrown, but just does not work as I would expect it to. Could not find something in the docs, guess we just have to accept it as a fact.

Oracle RMAN destination with variable restrains “not backed up” clause

What I tried is, to back up the same backupset twice, but with a “not backed up” clause at work. I’d expect that to work once at max, and a skip for the second turn. But as you can see, not:

RMAN> backup backupset 4954 not backed up to destination '/u03/orabackupNAS/sun/backupset/%Y_%M_%D';

Starting backup at 13-FEB-17
using channel ORA_DISK_1
channel ORA_DISK_1: input backup set: count=17295, stamp=935838125, piece=1
channel ORA_DISK_1: starting piece 1 at 13-FEB-17
channel ORA_DISK_1: backup piece +FRADG1/sun/autobackup/2017_02_13/s_935838125.6660.935838127
piece handle=/u03/orabackupNAS/sun/backupset/2017_02_13/SUN/backupset/2017_02_13/o1_mf_ncsnf_TAG20170213T110205_db31gdh2_.bkp comment=NONE
channel ORA_DISK_1: finished piece 1 at 13-FEB-17
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:03
Finished backup at 13-FEB-17

Starting Control File and SPFILE Autobackup at 13-FEB-17
piece handle=+FRADG1/sun/autobackup/2017_02_13/s_935838557.6796.935838559 comment=NONE
Finished Control File and SPFILE Autobackup at 13-FEB-17

RMAN> backup backupset 4954 not backed up to destination '/u03/orabackupNAS/sun/backupset/%Y_%M_%D';

Starting backup at 13-FEB-17
using channel ORA_DISK_1
channel ORA_DISK_1: input backup set: count=17295, stamp=935838125, piece=1
channel ORA_DISK_1: starting piece 1 at 13-FEB-17
channel ORA_DISK_1: backup piece +FRADG1/sun/autobackup/2017_02_13/s_935838125.6660.935838127
piece handle=/u03/orabackupNAS/sun/backupset/2017_02_13/SUN/backupset/2017_02_13/o1_mf_ncsnf_TAG20170213T110205_db31h5yd_.bkp comment=NONE
channel ORA_DISK_1: finished piece 1 at 13-FEB-17
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:03
Finished backup at 13-FEB-17

Starting Control File and SPFILE Autobackup at 13-FEB-17
piece handle=+FRADG1/sun/autobackup/2017_02_13/s_935838583.5200.935838585 comment=NONE
Finished Control File and SPFILE Autobackup at 13-FEB-17

Solution – without dynamic path name

The “to destination” clause with a date pattern generated by RMAN looked unusual enough to remove it for a try, and en voila:

RMAN> backup backupset 4954 not backed up to destination '/u03/orabackupNAS/sun/backupset';

Starting backup at 13-FEB-17
using channel ORA_DISK_1
skipping backup set key 4954; already backed up on 13-FEB-17
Finished backup at 13-FEB-17

RMAN>

 

Bad, but still good to know. I’ll have to try that with 12c ASAP.

Take care!
Martin

Oracle Database 12.2 on-premises release dates
Restarting Oracle for Performance is like a Coitus for Virginity

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.