Jared, A few thoughts... Ideas against the wall.... Compatible set the same on both databases. Doubt this is a problem, but you never know...? Did you try to run the individual lines of the script one at a time? Windows patch sets the same? RMAN has a command that will help debug parsing errors like this. Sometimes it's useful. When starting RMAN add SLAXDEBUG to the RMAN command line like this: rman target=/ slaxdebug This will show you all the parsing that is going on. This might help you find exactly where the error is occuring. Robert G. Freeman Oracle ACE Author: OCP: Oracle Database 11g Administrator Certified Professional Study Guide (Sybex) Oracle Database 11g New Features (Oracle Press) Portable DBA: Oracle (Oracle Press) Oracle Database 10g New Features (Oracle Press) Oracle9i RMAN Backup and Recovery (Oracle Press) Oracle9i New Features (Oracle Press) Other various titles out of print now... Blog: http://robertgfreeman.blogspot.com The LDS Church is looking for DBA's. You do have to be a Church member in good standing. A lot of kind people write me, concerned I may be breaking the law by saying you have to be a Church member. It's legal I promise! :-) http://pages.sssnet.com/messndal/church/parachurch.pdf ________________________________ From: Jared Still <jkstill@xxxxxxxxx> To: Oracle-L Freelists <oracle-l@xxxxxxxxxxxxx> Sent: Tuesday, May 26, 2009 2:18:01 PM Subject: RMAN conundrum 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