Rman stored script with allocate and send commands
EtopsMar 28 2013 — edited Sep 4 2013Hi,
We are using EMC Avamar to backup our 11gR2 Oracle databases.
I'm trying to implement stored scripts.
To goal is to have only one shell script for hole our databases, and a few Rman stored scripts.
Here is the Rman part for Avamar :
{
allocate channel c1 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so";
allocate channel c2 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so";
allocate channel c3 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so";
allocate channel c4 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so";
allocate channel c5 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so";
send channel='c1' '"--flagfile=/mcorp/conf/avamar/&1.conf" "--bindir=/usr/local/avamar/bin" "--cacheprefix=c1" "--logfile=/usr/local/avamar/var/c1_avoracle_db.log"';
send channel='c2' '"--flagfile=/mcorp/conf/avamar/&1.conf" "--bindir=/usr/local/avamar/bin" "--cacheprefix=c2" "--logfile=/usr/local/avamar/var/c2_avoracle_db.log"';
send channel='c3' '"--flagfile=/mcorp/conf/avamar/&1.conf" "--bindir=/usr/local/avamar/bin" "--cacheprefix=c3" "--logfile=/usr/local/avamar/var/c3_avoracle_db.log"';
send channel='c4' '"--flagfile=/mcorp/conf/avamar/&1.conf" "--bindir=/usr/local/avamar/bin" "--cacheprefix=c4" "--logfile=/usr/local/avamar/var/c4_avoracle_db.log"';
send channel='c5' '"--flagfile=/mcorp/conf/avamar/&1.conf" "--bindir=/usr/local/avamar/bin" "--cacheprefix=c4" "--logfile=/usr/local/avamar/var/c4_avoracle_db.log"';
backup section size 50G incremental level = &2 database filesperset 1 format 'DB_%U' tag = &3 plus archivelog format 'ARCH_%U' tag = &4 ;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
}
Here is the problem :
[oracle@xodbback02u backup]$ rman target / catalog rman@DBCAT
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Mar 28 15:20:46 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: BACKDB1 (DBID=2441779498)
recovery catalog database Password:
connected to recovery catalog database
RMAN> create global script backup_db_p5 from file '/mcorp/apps/cron/backup/backup_db_p5.rman';
script commands will be loaded from file /mcorp/apps/cron/backup/backup_db_p5.rman
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of create script command at 03/28/2013 15:20:56
RMAN-06700: error parsing text script in file /mcorp/apps/cron/backup/backup_db_p5.rman
RMAN-01009: syntax error: found "amper": expecting one of: "integer"
RMAN-01007: at line 11 column 45 file: /mcorp/apps/cron/backup/backup_db_p5.rman
RMAN>
In the Oracle documentation, it is said that everything that is working in a run block, will work in a stored script.
Forced to admit this is not the case here.
Does anybody have an idea ?
Regards,
Guillaume