Re: Changing Date Format in RMAN log file

  • From: "Tim Gorman" <tim@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 23 Jan 2007 13:47:54 -0700

Sam,

Before calling the RMAN executable, set the UNIX environment variable 
NLS_DATE_FORMAT to the desired format, instead of the Oracle session variable 
after you're in RMAN.

-Tim

On Tue, 23 Jan 2007 15:38:48 -0500, Sam Bootsma wrote
> I call my RMAN script from aUnix shell script.  I have pasted parts of the 
> RMAN output below.  Notethat I have changed nls_date_format to 
> ?yyyy-mm-dd-hh24-mi-ss'.  Iexpected to see the date displayed in this format, 
> but instead I see the dateas ?23-JAN-07?.  Can anybody tell me how I can get 
> the RMANlog file to show the date as 2007-01-23-13-27-14?  Or even better, as 
> 2007-01-2313:27:14.
>  
> BTW, RMAN threw errors whenI used ?:? in the time part of the date format, 
> that is why I havedashes there.
>  
> Here is the partial outputfrom the RMAN log file.
>  
> Recovery Manager: Release10.2.0.2.0 - Production on Tue Jan 23 12:14:01 2007
>  
> RMAN> connect target *
> 2> connect catalog *
> 3> run {
> 4> sql "altersession set nls_date_format=''yyyy-mm-dd-hh24-mi-ss''";
> 5> sql "alter systemarchive log current";
> 6> allocate channel t1type 'SBT_TAPE';
> 7> send'NSR_ENV=(NSR_SERVER=X, NSR_DATA_VOLUME_POOL=TAPEDAILY)';
> 8> backup
> 9> format'/LOG_%d_%T_%p_%s%t'
> 10> (archivelog alldelete input);
> 11> release channel t1;
> 12> }
> 13> 
> ?
> sql statement: alter sessionset nls_date_format=''yyyy-mm-dd-hh24-mi-ss''
> sql statement: alter systemarchive log current
> ?
> Starting backup at 23-JAN-07
> ?
> channel t1: starting piece 1at 23-JAN-07
> channel t1: finished piece 1at 23-JAN-07
> ?
> channel t1: backup setcomplete, elapsed time: 01:40:37
> ?
> Finished backup at 23-JAN-07
>  
> ?
>  
> Sam Bootsma
> Oracle Database Administrator
> Information Technology Services
> George Brown College
> Phone: 416-415-5000 x4933
> Fax: 416-415-4836
> E-mail: sbootsma@xxxxxxxxxxxxxx
>  

Tim Gorman 
consultant - Evergreen Database Technologies, Inc.

website = http://www.evdbt.com 
email   = tim@xxxxxxxxx 
mobile  = +1-303-885-4526 
fax     = +1-303-484-3608
 

Other related posts: