RE: Can I pass a parameter into an RMAN Script?

  • From: "Mercadante, Thomas F (LABOR)" <Thomas.Mercadante@xxxxxxxxxxxxxxxxx>
  • To: <sbootsma@xxxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 25 Feb 2008 13:12:16 -0500

If you generate the Rman commands within your unix script, you can use
substituion variables:
export RMANSCR=/tmp/rman_scr.rcv
export RMANLOG=/tmp/rman.log
echo "format '/san2/orabackup/${ORACLE_SID}/CTRL_%d_%T_%p_%s%t';" >>
rman target user/pwd catalog user/pw cmdfile $RMANSCR msglog  $RMANLOG
Get the idea?



From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Sam Bootsma
Sent: Monday, February 25, 2008 12:45 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Can I pass a parameter into an RMAN Script?

Hello all,


Oracle, Enterprise Edition, on AIX 5.3.


In our RMAN backup scripts for our AAA database we have several format
lines that look like:

format '/san2/orabackup/AAA/CTRL_%d_%T_%p_%s%t';


The same lines for our BBB database looks like:

format '/san2/orabackup/BBB/CTRL_%d_%T_%p_%s%t';


Because of this difference in the format lines I need to create and
maintain separate RMAN scripts for each database.  If I could pass a
parameter into the RMAN script, then I could have just one RMAN script
and call it with a parameter specifying the database name.


Can anybody tell me if this is possible?  Or must I continue to create
separate RMAN scripts for each database I wish to backup?  I checked the
Oracle docs, but could not find anything that spoke to what I want to




Sam Bootsma

Oracle Database Administrator

Information Technology Services
George Brown College

Phone: 416-415-5000 x4933
Fax: 416-415-4836
E-mail: sbootsma@xxxxxxxxxxxxxx <mailto:sbootsma@xxxxxxxxxxxxxx> 


Other related posts: