Tuesday, 15 May 2018

RMAN-06091: no channel allocated for maintenance | RMAN-03002 - Oracle Database

RMAN-03002: failure of delete command | RMAN-06091: no channel allocated for maintenance (of an appropriate type)

RMAN-06091: no channel allocated for maintenance

This error was occurred at one of my Client’s Production Environment where I had scheduled both EXPDP and RMAN backups. “Backups are stopped” – this was the issue reported to me so I took the Team Viewer and when I checked for the latest backup log, I saw the below mentioned lines at the end of the logfile.

Backup Set           2779   09-MAY-18         
  Backup Piece       2779   09-MAY-18          c-2994381161-20180509-06.1525876207
Backup Set           2781   09-MAY-18         
  Backup Piece       2781   09-MAY-18          c-2994381161-20180509-07.1525876207
Backup Set           2783   09-MAY-18         
  Backup Piece       2783   09-MAY-18          c-2994381161-20180509-08.1525876207
Backup Set           2785   09-MAY-18         
  Backup Piece       2785   09-MAY-18          c-2994381161-20180509-09.1525876207
Backup Set           2787   09-MAY-18         
  Backup Piece       2787   09-MAY-18          c-2994381161-20180509-0a.1525876207
Backup Set           2789   09-MAY-18         
  Backup Piece       2789   09-MAY-18          c-2994381161-20180509-0b.1525876207
released channel: ch1
released channel: ch2
released channel: ch3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 05/15/2018 10:15:02
RMAN-06091: no channel allocated for maintenance (of an appropriate type)
Recovery Manager complete.

To my surprise the backup was failing with RMAN-03002 and RMAN-06091 errors. The same errors got generated after the below mentioned command ran from the RMAN script:

RMAN> delete obsolete noprompt;

Note: If you are looking for best RMAN incremental backup scripts, I have provided the same. You can find them on the below mentioned links

Anyway, I looked for the reason and the reason found out to be more interesting. Previously the client used to take the backups on TAPE rather than extracting the same on DISK. And somehow the repository for the backups was not cleaned properly. Because when I ran,

RMAN> List backup;

I saw a lot of backups with device type – SBT_TAPE in the RMAN repository. In my scheduled scripts, I was allocating the channel type DISK and since the obsolete backups were taken from SBT_TAPE as allocated channel, my channel was unable to clean the repository. To make things right, I ran the below mentioned commands at RMAN prompt,

RMAN> Allocate channel for maintenance type 'sbt_tape';
RMAN> delete noprompt obsolete;   
RMAN> delete noprompt expired archivelog all;
RMAN> delete noprompt expired backup;  
RMAN> delete noprompt expired copy;

And all my obsolete entries were removed this time from RMAN repository. You can allocate both of the channels for DISK as well as for TAPE simultaneously like

RMAN> ALLOCATE CHANNEL FOR MAINTENANCE TYPE DISK;
RMAN> ALLOCATE CHANNEL FOR MAINTENANCE TYPE 'sbt_tape';

I hope this helps !!


No comments:

Post a comment