RMAN conundrum

  • From: Jared Still <jkstill@xxxxxxxxx>
  • To: Oracle-L Freelists <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 26 May 2009 13:18:01 -0700

First, a little background.

Two SAP systems running on a single Windows Server.

Windows 2003 Server
Oracle 10.2.0.4
Databases are using separate ORACLE_HOMEs.

Backups consistently fail following the last command of the RMAN
script for one of the databases, but not the other.

Each database has its own copy of the backup scripts.
The only difference is the script that sets the ORACLE_HOME,
PATH and ORACLE_SID.

Other than that, the backup scripts are identical, as was
confirmed by using md5sum in cygwin to compare them.

Here's the relevant part of the RMAN script:

@(
echo RUN {
echo  SQL 'ALTER SESSION SET OPTIMIZER_MODE=RULE';
echo  SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
echo  BACKUP FORMAT '%FORMAT_PREFIX%_arch_%FORMAT_SUFFIX%' ARCHIVELOG ALL
NOT BACKED UP 2 TIMES;
echo  DELETE NOPROMPT ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
echo  BACKUP FORMAT '%FORMAT_PREFIX%_ctl_%FORMAT_SUFFIX%' CURRENT
CONTROLFILE;
echo }
) | %RMAN% target %TARGET_CONNECT_STR% catalog %RCAT_CONNECT_STR% msglog
'%RMAN_LOG_FILE%' append

all of the environment variables are being set correctly.

On database A, everything works fine.

On database B, this error occurs after executing the last line of the
script where the current controlfile is to be backed up:

RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "}": expecting one of: "allocate, alter,
backup, beginline, blockrecover, catalog, change, connect, copy, convert,
create, crosscheck, configure, duplicate, debug, delete, drop, exit,
endinline, flashback, host, {, library, list, mount, open, print, quit,
recover, register, release, replace, report, renormalize, reset, restore,
resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup,
shutdown, send, show, test, transport, upgrade, unregister, validate"
RMAN-01007: at line 1 column 1 file: standard input

If I remove the last line of the script, so that the script looks like this:

@(
echo RUN {
echo  SQL 'ALTER SESSION SET OPTIMIZER_MODE=RULE';
echo  SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
echo  BACKUP FORMAT '%FORMAT_PREFIX%_arch_%FORMAT_SUFFIX%' ARCHIVELOG ALL
NOT BACKED UP 2 TIMES;
echo  DELETE NOPROMPT ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
echo }
) | %RMAN% target %TARGET_CONNECT_STR% catalog %RCAT_CONNECT_STR% msglog
'%RMAN_LOG_FILE%' append

...  then the script fails with the same error as previously.

Adding SHOW ALL as the last command causes the SHOW ALL output to
be in the logfile, followed by the same error message complaining about '}'

querying DBA_REGISTRY_HISTORY shows the same patches applied to both
databases.

opatch lsinventory -details shows that database B has 2 products
installed that are not on database A

 diff A_details.txt B_details.tx

< Installed Products (172):
---
> Installed Products (174):
82a83
> Oracle Configuration Manager
10.2.7.1.0
149a151
> Oracle Real Application Testing
10.2.0.4.0

comparing the output of SHOW ALL for both shows the only difference
to be the value for SNAPSHOT CONTROLFILE NAME

The logfile includes the PATH information, and it is correct in both
instances.

It's my hope that someone here can think of something I've missed.

The backups are working, but it's move than a little annoying to see the
errors in the logs every day, and then have to go check to see if it's the
same old "problem", or a real problem.

Thanks,

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: