Rman 11gR2 changes tag labeling of the inc backup in incrementally updated backups

Harry Dragstra
0 0
Read Time:1 Minute, 31 Second

In (rman) incrementally updated backups, only incremental backups are done after the first full backup to the Fast Recovery Area. From 11gR2 on the incremental backup pieces will get the same tag as the datafile copies, and that’s actually different behaviour from pre- 11gR2 versions of the database. I stumbled on this different behaviour when a backup script, that worked perfectly on 11gR2, got ported to 10gR2 and 11gR1 ( 11.1.7 ). The script contains a system cleanup of all incrementals, done before a certain date, specifying the tag of the copy [ ‘COPY_DATABASE’ ]. On 11gR2 the inc1 backups got deleted fine, but the delete on 10gR2 and 11gR1 just wouldn’t work.

By checking v$backup_piece…

select distinct tag
from v$backup_piece
where instr(tag,'TAG')=0;

…and getting no result, it became clear that the tag of the copy datafiles, was’t also the tag of the incrementals.

Once I knew, it was easy to correct the problem. I just added the tag of my copy datafiles to the incremental backup, and that did the trick. All incrementals that were supposed to get cleared from the pre-11gR2 system, were deleted. The incrementals without tag, already on the system, were deleted manually.

My original 11gR2 incremental backup, and delete:

run{
allocate channel d1 device type disk;
backup
filesperset 8
incremental level 1
for recover of copy with tag 'COPY_DATABASE' database;
release channel d1;
}

run {
allocate channel d2 device type disk;
delete noprompt
backupset
tag 'COPY_DATABASE'
completed before 'trunc(sysdate-7)';
release channel d2;
}

The pre-11gR2 version of the incremental backup.. the delete hasn’t changed:

run{
allocate channel d1 device type disk;
backup
filesperset 8
incremental level 1
tag 'COPY_DATABASE'
for recover of copy with tag 'COPY_DATABASE' database;
release channel d1;
}

About Post Author

Harry Dragstra

Harry Dragstra is Senior Oracle DBA. He is specialized in Oracle RAC, Oracle Virtualization, and has a a strong interest in APEX development and PL/SQL.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

AMIS @ Heliview BPM Event 26 October 2011

Many organizations are working to ensure consistency between internal processes to optimize efficiency and effectiveness smoothly. For many, the benefits of BPM are well known, but few know how to begin now. On October 26, 2011 AMIS Services will give a business presentation about BPM at the conference organized by BPM Heliview in Figi in Zeist. This year the event is particularly interesting. Because besides the phenomenon BPM there is a lot of attention for both the business approach as for the technology. AMIS will […]
%d bloggers like this: