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 -> RMAN: Syntax for including datestamp in output filename

RMAN: Syntax for including datestamp in output filename

From: BD <bobby_dread_at_hotmail.com>
Date: 6 Jan 2006 09:56:10 -0800
Message-ID: <1136570170.910838.71470@f14g2000cwb.googlegroups.com>


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 Received on Fri Jan 06 2006 - 11:56:10 CST

Original text of this message

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