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

Home -> Community -> Usenet -> c.d.o.server -> Re: RMAN: Syntax for including datestamp in output filename

Re: RMAN: Syntax for including datestamp in output filename

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 07 Jan 2006 11:11:52 +0100
Message-ID: <lr4vr11causqt3craq8ijoc4n0gp5k5rt7@4ax.com>


On 6 Jan 2006 09:56:10 -0800, "BD" <bobby_dread_at_hotmail.com> wrote:

>Hi, all.
>
>I'm running 8.1.7.4 on AIX 5.2.
>
>I am trying to get my RMAN to include the date/time in its output
>filenames. It is not working.
>
>First I tried declaring a variable in the environment:
>NOW=`date '+%Y%m%d_%H:%M:%S'`; export NOW
>
>In the same script which declares that variable, I next call RMAN, and
>pass it the name of a script which contains the run{} string.
>
>Then, in the channel declaration of the RMAN script I assigned the
>following format:
>'/bkup01/RMAN/${ORACLE_SID}_full_${NOW}'
>
>I tried the NOW parameter with and without the parentheses.
>
>In both cases, the resulting error message was:
>ORA-07217: sltln: environment variable cannot be evaluated.
>
>As a second attempt, I tried to include the `date` string directly in
>the RMAN script, as in
>'/bkup01/RMAN/${ORACLE_SID}_full_`date +%Y%m%d_%H:%M:%S`'
>
>This ended up writing a file to the filesystem called
>DEV2_full_`date +%Y%mTACSDEV2_%H:%M:%S`
>
>Can someone venture a guess as to why that environment variable is not
>working? I've done some reading which suggests some library is not
>being accessed due to a missing environment variable, but I see no
>connection between the variable I'm creating and any libraries.
>
>Thanks for all assistance!!
>
>BD

1 The backup command has it own format modifiers to include date and time.
2 You did make sure the rman command line runs like rman ...... <<EOD

EOD Didn't you?

--
Sybrand Bakker, Senior Oracle DBA
Received on Sat Jan 07 2006 - 04:11:52 CST

Original text of this message

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