I recently upgraded a database from 11g to 12c without issues, but after several days, I noticed that the archived redo logs were not being deleted from the filesystem, even after they were backed up to tape.
At first I thought that there might be some issues with that specific database, but when I verified other 12c databases that uses the same backup script, I found that they were exhibiting the same behaviour.
So I started the troubleshooting process by checking the RMAN configuration, nothing seemed out of the ordinary. I use the following settings:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO TAPE;
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE BACKUP OPTIMIZATION OFF;
The RMAN command is this:
run {
backup filesperset 1 tag ‘arl_test’ archivelog all;
delete noprompt archivelog all backed up 2 times to device type sbt;
}
According to these, the archived logs should be deleted once they have been backed up to tape, so what is going on? Regardless of how many times I would run the rman command, I would always end with a warning like this:
RMAN-08138: WARNING: archived log not deleted - must create more backups
Because we couldn’t keep adding space to the filesystem, as a workaround, we implemented a script to force the archived log deletion by using this:
run {
delete force noprompt archivelog all backed up 1 times to device type sbt;
}
This started to work fine, so why this command works and the other doesn’t ?
After several hours I decided to make the following change to the RMAN configuration:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO SBT;
and voila! changing the device type from TAPE to SBT solved the issue. Even though TAPE is not a valid device type, it used to work as a synonym up until 11g. In Oracle 12c, even though does not error out, TAPE synonym stopped working altogether.
The proper name of the tape device is SBT (System Backup to Tape).
Comments
Post a Comment