Monday, May 14, 2012

RMAN-06091: no channel allocated for maintenance (of an appropriate type)


When trying to delete obsolete backup, I get the error RMAN-06091. This is because no automatic channel is configured. Here is the solution.


RMAN> delete NOPROMPT FORCE obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           54609  04-MAY-12
  Backup Piece       54611  04-MAY-12          +DGFRA/TESTKING/autobackup/2012_05_04/s_782360264.1547.782360265
Backup Set           54700  04-MAY-12
  Backup Piece       54703  04-MAY-12          bk_1004_1_782395200
Backup Set           54765  04-MAY-12
  Backup Piece       54771  04-MAY-12          bk_1008_1_782396485
Backup Set           54992  04-MAY-12
  Backup Piece       55022  04-MAY-12          /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1017_P1_T782403372_20120504
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 05/14/2012 07:13:12
RMAN-06091: no channel allocated for maintenance (of an appropriate type)

RMAN> allocate channel for maintenance type disk;

allocated channel: ORA_MAINT_DISK_2
channel ORA_MAINT_DISK_2: SID=1265 instance=TESTKING1 device type=DISK

RMAN> delete obsolete device type disk;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           54609  04-MAY-12
  Backup Piece       54611  04-MAY-12          +DGFRA/TESTKING/autobackup/2012_05_04/s_782360264.1547.782360265
Backup Set           54992  04-MAY-12
  Backup Piece       55022  04-MAY-12          /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1017_P1_T782403372_20120504

Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=+DGFRA/TESTKING/autobackup/2012_05_04/s_782360264.1547.782360265 RECID=984 STAMP=782360264
Deleted 1 objects

deleted backup piece
backup piece handle=/oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1017_P1_T782403372_20120504 RECID=992 STAMP=782403373
Deleted 1 objects


RMAN>
RMAN> delete expired backup;


List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
54859   54851   1   1   EXPIRED     DISK        /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1014_P1_T782403041_20120504
54860   54852   1   1   EXPIRED     DISK        /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1015_P1_T782403187_20120504
55021   54991   1   1   EXPIRED     DISK        /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1016_P1_T782403216_20120504
55260   55255   1   1   EXPIRED     DISK        /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1024_P1_T782650481_20120507
55261   55256   1   1   EXPIRED     DISK        /oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1025_P1_T782650643_20120507

Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1014_P1_T782403041_20120504 RECID=989 STAMP=782403042
deleted backup piece
backup piece handle=/oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1015_P1_T782403187_20120504 RECID=990 STAMP=782403188
deleted backup piece
backup piece handle=/oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1016_P1_T782403216_20120504 RECID=991 STAMP=782403218
deleted backup piece
backup piece handle=/oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1024_P1_T782650481_20120507 RECID=995 STAMP=782650488
deleted backup piece
backup piece handle=/oravl01/oracle/11.1.0.7/dbs/backup_TESTKING_set1025_P1_T782650643_20120507 RECID=996 STAMP=782650643
Deleted 5 EXPIRED objects


RMAN>


For tape based backup,


RMAN> allocate channel for maintenance device type 'sbt_tape' parms. 


change your tape parameter. Also see ID: 567555.1 

2 comments: