Monday, July 27, 2015

Oracle RMAN Backup error - ORA-01008

ORA-01008: not all variables bound while doing RMAN backup

Recovery Manager: Release 11.2.0.2.0 - Production on Tue Jul 217 13:026:22 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
RMAN>
connected to target database: QSTPRDR (DBID=3992020636)
RMAN>
connected to recovery catalog database

RMAN> 2> 3> 4> 5> 6> 7> 8> 9>

DBGSQL:     TARGET> select  nvl(max(al.recid), '0'),nvl(max(al.recid), 0)   into  :txtparmvalue, :parmvalue   from  v$archived_log al  where  al.status in ('X', 'A')    and  al.is_recovery_dest_file = 'YES'    and  al.creator = 'RMAN'
DBGSQL:        sqlcode = 1008
allocated channel: t1
channel t1: SID=1726 device type=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 6.5 (2009050106)
DBGSQL:     TARGET> select  nvl(max(al.recid), '0'),nvl(max(al.recid), 0)   into  :txtparmvalue, :parmvalue   from  v$archived_log al  where  al.status in ('X', 'A')    and  al.is_recovery_dest_file = 'YES'    and  al.creator = 'RMAN'
DBGSQL:        sqlcode = 1008
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 27/07/2015 13:28:36
RMAN-03014: implicit resync of recovery catalog failed
ORA-01008: not all variables bound
RMAN>
Recovery Manager complete.

I noticed that resync catalog or crosscheck archivelog all did not help in this case and this error appears due to a BUG in 11.2.0.2. You can read more about this issue at Oracle Metalink doc ID: 1280447.1

Current fix is to flush shared_pool and you will be able to start rman backup again.
SQL> alter system flush shared_pool;

No comments: