Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RMAN Syntax

RE: RMAN Syntax

From: <oracle-l-bounce_at_freelists.org>
Date: Wed, 20 Jul 2005 12:09:03 -0400
Message-ID: <ABB9D76E187C5146AB5683F5A07336FF35FA6A@EXCNYSM0A1AJ.nysemail.nyenet>


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 {"                                      >  $DBRMANSCRIPT
echo " 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; " >>

${PAR_FILE}

echo "} "

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-l
Received on Wed Jul 20 2005 - 11:11:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US