Changing Date Format in RMAN log file

  • From: "Sam Bootsma" <sbootsma@xxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 23 Jan 2007 15:38:48 -0500

I call my RMAN script from a Unix shell script.  I have pasted parts of
the RMAN output below.  Note that I have changed nls_date_format to
'yyyy-mm-dd-hh24-mi-ss'.  I expected to see the date displayed in this
format, but instead I see the date as "23-JAN-07".  Can anybody tell me
how I can get the RMAN log file to show the date as 2007-01-23-13-27-14?
Or even better, as 2007-01-23 13:27:14.

 

BTW, RMAN threw errors when I used ":" in the time part of the date
format, that is why I have dashes there.

 

Here is the partial output from the RMAN log file.

 

Recovery Manager: Release 10.2.0.2.0 - Production on Tue Jan 23 12:14:01
2007

 

RMAN> connect target *

2> connect catalog *

3> run {

4> sql "alter session set nls_date_format=''yyyy-mm-dd-hh24-mi-ss''";

5> sql "alter system archive log current";

6> allocate channel t1 type '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 all delete input);

11> release channel t1;

12> }

13> 

...

sql statement: alter session set
nls_date_format=''yyyy-mm-dd-hh24-mi-ss''

sql statement: alter system archive log current

...

Starting backup at 23-JAN-07

...

channel t1: starting piece 1 at 23-JAN-07

channel t1: finished piece 1 at 23-JAN-07

...

channel t1: backup set complete, 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 <mailto:sbootsma@xxxxxxxxxxxxxx> 

 

Other related posts: