RMAN script fails on sql statements RMAN-03009 RMAN-10015

(Doc ID 2103129.1)

Last updated on SEPTEMBER 06, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.5 to 12.1.0.2 [Release 10.2 to 12.1]
Information in this document applies to any platform.

Symptoms

RMAN backup script fails to sendmail.

Problem Description
---------------------------------------------------

Below is the RMAN backup script. This FAILS at sendmail:
RUN {
resync catalog;
shutdown immediate;
startup mount;
ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL CH2 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL CH3 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL CH4 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL CH5 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL CH6 TYPE 'SBT_TAPE';
backup
  full
  filesperset 1
  format 'TDRSTG_DB_%d_%U'
  database;
backup
  format 'TDRSTG_CTL_%d_%U'
  current controlfile;
delete noprompt obsolete;
delete FORCE noprompt expired backup;
alter database open;
sql "exec send_mail_mbta360('Database@MBTA.com','DWITSupport@mbta.com','TDRSTG Successful Full Backup Notification','Successful full backup of database TDRSTG at '||sysdate)";
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
RELEASE CHANNEL CH3;
RELEASE CHANNEL CH4;
RELEASE CHANNEL CH5;
RELEASE CHANNEL CH6;
}

RMAN-03009: failure of sql command on default channel.
RMAN-10015: error compiling PL/SQL program

Changes

 none

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms