Recently at my client place I implemented RMAN script for maintenance of backups through RMAN, so that my team don’t have to use GUI to do the same.
When running the script everthing was smooth, except at the end of the script result was showing error ORA-19569 as follows:
RMAN> run
2> {
3> allocate channel c1 device type disk format ‘F:\rmanbackup\incrementalbackup\%d_DB_%u_%s_%p’;
4> delete archivelog until time ’sysdate-7′;
5> delete noprompt obsolete;
6> }
7>
using target database controlfile instead of recovery catalog
allocated channel: c1
channel c1: sid=202 devtype=DISK
deleted archive log
archive log filename=D:\ARCHIVE\BIZWIZ\ARC67474_0566156678.001 recid=106781 stamp=635438642
Deleted 2 objects
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 3 days
Deleting the following obsolete backups and copies:
Type                Key   Completion Time   Filename/Handle
——————– —— —————— ——————–
Backup Set          323   02-OCT-07
Backup Piece      323   02-OCT-07         F:\RMANBACKUP\INCREMENTALBACKUP\BIZWIZ_DB_I2ITGSPP_578_1
………..
………..
Backup Set          367   10-OCT-07
Backup Piece      367   10-OCT-07         F:\RMANBACKUP\INCREMENTALBACKUP\BIZWIZ_DB_LJIU6A4T_691_1
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on default channel at 10/15/2007 14:20:32
ORA-19569: no device is allocated to this session
Recovery Manager complete.
It was happening due to command “delete noprompt obsolete;“,
I changed the script little bit and add one more command “release channel c1;” to release the channel before deleting as follows:
RMAN> run
2> {
3> allocate channel c1 device type disk format ‘F:\rmanbackup\incrementalbackup\%d_DB_%u_%s_%p’;
4> delete archivelog until time ’sysdate-7′;
5> release channel c1;
6> delete noprompt obsolete;
7> }
8>
using target database controlfile instead of recovery catalog
allocated channel: c1
channel c1: sid=92 devtype=DISK
specification does not match any archive log in the recovery catalog
released channel: c1
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 3 days
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=92 devtype=DISK
Deleting the following obsolete backups and copies:
Type                Key   Completion Time   Filename/Handle
——————– —— —————— ——————–
Backup Set          323   02-OCT-07
Backup Piece      323   02-OCT-07         F:\RMANBACKUP\INCREMENTALBACKUP\BIZWIZ_DB_I2ITGSPP_578_1
………..
………..
backup piece handle=F:\RMANBACKUP\INCREMENTALBACKUP\BIZWIZ_DB_LIIU6A3Q_690_1 recid=366 stamp=635644026
deleted backup piece
backup piece handle=F:\RMANBACKUP\INCREMENTALBACKUP\BIZWIZ_DB_LJIU6A4T_691_1 recid=367 stamp=635644063
Deleted 332 objects
Recovery Manager complete.
After this it was smooth. I want to specify following important point in relation to RMAN “delete” command which will help us understand what exactly was the problem in script:
The target instance must be started.
A maintenance channel is not required when DELETE is used with a file that is disk-only (that is, an ARCHIVELOG, DATAFILECOPY, CONTROLFILECOPY). Â Â Â Otherwise, you must use a manual or automatic maintenance channel.
If you use DELETE on files that are not disk-only, and if you have objects created on device types that are not configured for automatic channels, then run manual maintenance commands on these channels. For example, if you created a backup using an sbt channel, but have only a DISK channel automatically configured, you must manually allocate an sbt channel for DELETE.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment