Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: RMAN Syntax
Ron,
The easiest way to do this is to just create the Rman script manually. Run it to make sure it works properly.
Then convert it into a shell script like you are trying to do below, substituting environmental variables where appropriate.
My database backup script looks like this:
DATETIME="`date '+%Y%m%d'`_`date '+%H%M%S'`"
DATE="`date '+%Y%m%d'"
DBRMANSCRIPT="$DBA_TEMP/DbRman_Incr_$BACKUPTYPE_$DBNAME_$DATETIME.rcv"
echo "run {" > $DBRMANSCRIPTecho " allocate channel d2 type disk parms 'BLKSIZE=$RMAN_BLKSIZE';" >> $DBRMANSCRIPT
echo " backup" >> $DBRMANSCRIPT echo " incremental level $BACKUPTYPE" >> $DBRMANSCRIPT echo " tag \"${DBNAME}_lv${BACKUPTYPE}_${DATE} \" " >> $DBRMANSCRIPT echo " (database format '$RMAN_DISKF');" >> $DBRMANSCRIPT echo " release channel d2;" >> $DBRMANSCRIPT echo " }" >> $DBRMANSCRIPT
Good Luck!
Tom
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Smith, Ron L.
Sent: Wednesday, July 20, 2005 11:41 AM
To: oracle-l_at_freelists.org
Subject: RMAN Syntax
I am trying to build a parameter file for RMAN. I can't get the format of the syntax correct.
Can anyone tell me what is wrong with this?
echo "backup database plus archivelog delete input " >>
${PAR_FILE}
echo " format '${DMP_DIR}/%d_t%t_s%s_p%p.bak' " >>
${PAR_FILE}
echo " tag = '${ORACLE_SID}_${TIMESTAMP}' " >>
${PAR_FILE}
echo " setsize= 2097160192; " >>
${PAR_FILE}
echo "delete noprompt force obsolete; " >>
Thanks!
Ron
Important Notice!!
If you are not the intended recipient of this e-mail message, any use,
distribution or copying of the message is prohibited.
Please let me know immediately by return e-mail if you have received
this message by mistake, then delete the e-mail message.
Thank you.
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Wed Jul 20 2005 - 11:11:13 CDT
![]() |
![]() |