Skip to content

PLS-00306: wrong number or types of arguments in call to ‘GETDCBACKUPHISTORY’ RMAN-06004 ORA-06550

SYMPTOMS

Rman backup fails when connected through catalog. But when rman connects directly the jobs run OK.

DBGSQL: RCVCAT> declare first boolean := FALSE;
bhistoryRec dbms_rcvman.bhistoryRec_t;
atAnyScn boolean := FALSE; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
begin if (:first > 0) THEN first := TRUE; end if;
if (:atAnyScn > 0) THEN atAnyScn := TRUE; end if;
dbms_rcvman.getDcBackupHistory( backedUpDev => :devtype:devtype_i, first => first, bhistoryRec => bhistoryRec, doingCmd => :backup, keepTag => :tag, toDest1 => :todest1, toDest2 => :tod est2, toDest3 => :todest3, toDest4 => :todest4, atAnyScn => atAnyScn );
:fileno := bhistoryRec.dfNumber; :crescn := bhistoryRec.create_scn; :rlgscn := bhistoryRec.reset_s cn;
:rlgtime := bhistoryRec.reset_time; :ckpscn := bhistoryRec.ckp_scn; :nbackups := bhistoryRec.nbackups;
:compTime := bhistoryRec.compTime; end;
DBGSQL: sqlcode = 6550
DBGSQL: B :fileno = NULL
DBGSQL: B :crescn = NULL
DBGSQL: B :rlgscn = NULL
DBGSQL: B :rlgtime = NULL
DBGSQL: B :ckpscn = NULL
DBGSQL: B :nbackups = NULL
DBGSQL: B :compTime = NULL
DBGSQL: B :first = 1
DBGSQL: B :devtype = SBT_TAPE
DBGSQL: B :backup = B
DBGSQL: B :tag = NULL
DBGSQL: B :todest1 = NULL
DBGSQL: B :todest2 = NULL
DBGSQL: B :todest3 = NULL
DBGSQL: B :todest4 = NULL
DBGSQL: B :atAnyScn = 0
released channel: T1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 09/09/2019 10:27:58
RMAN-06004: ORACLE error from recovery catalog database: ORA-06550: line 1, column 211:
PLS-00306: wrong number or types of arguments in call to ‘GETDCBACKUPHISTORY’
ORA-06550: line 1, column 211:
PL/SQL: Statement ignored

CAUSE 1

A new variable, atAnyScn, is passed to dbms_rcvman.GETDCBACKUPHISTORY in new RMAN catalog versions.
If this variable is not part of the dbms_rcvman description then this error is returned.
 
DESCRIBE on dbms_rcvman on recovery catalog schema is not showing this variable atAnyScn

 

SOLUTION 1

Run DESCRIBE on dbms_rcvman on recovery catalog schema and see if it’s showing this variable : atAnyScn

a.  Connected to the catalog schema with sqlplus, execute:

SQL>  desc dbms_rcvman;

b.  Check for the existence of atAnyScn under PROCEDURE GETDCBACKUPHISTORY

c.  If it does not exist, this catalog schema needs to be upgraded.

CAUSE 2

forgot upgrade catalog after datapatch -verbose

 

SOLUTION 2

rman catalog username/password@rman

RMAN> UPGRADE CATALOG;

RMAN> UPGRADE CATALOG;

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: