Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: April 26, 2012 - 12:53 pm UTC

Last updated: October 12, 2015 - 11:54 am UTC

Version: 11.2

Viewed 50K+ times! This question is

You Asked


I see Rman always shows date in DD-MON-YY format.

Like the following if we list backupet or any rman command

Control File Included: Ckp SCN: 473578586 Ckp time: 26-APR-12

How to set date format to MM/DD/YYYY HH24:MI:SS in rman ?


and Tom said...

You can just set the NLS_DATE_FORMAT before going into RMAN:

<b>[tkyte@localhost ~]$ export NLS_DATE_FORMAT="dd-month-yyyy hh:mi:ss am"
</b>[tkyte@localhost ~]$ !rman
rman target=/

Recovery Manager: Release 11.2.0.3.0 - Production on Mon May 7 07:00:35 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA11GR2 (DBID=52489347)

RMAN> backup spfile;

Starting backup at 07-may      -2012 07:00:38 am
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=9 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 07-may      -2012 07:00:39 am
channel ORA_DISK_1: finished piece 1 at 07-may      -2012 07:00:40 am
piece handle=/home/ora11gr2/app/ora11gr2/fast_recovery_area/ORA11GR2/backupset/2012_05_07/o1_mf_nnsnf_TAG20120507T070039_7thbtq8o_.bkp tag=TAG20120507T070039 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-may      -2012 07:00:40 am

RMAN> 


(environment variable or registry setting on windows)


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

RMAN NLS_DATE_FORMAT

Stanislav Sust, October 12, 2015 - 10:42 am UTC

Tom,

I call rman script save in rman catalog from EMC Networker wizard and I cannot use OS setting - export NLS_DATE_FORMAT.
I try to use sql 'alter session ...' but it is not working :

RMAN> run {SQL 'ALTER SESSION SET NLS_DATE_FORMAT="DD.MM.YYYY HH24:MI:SS"';
2> ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE' MAXOPENFILES 1 PARMS='SBT_LIBRARY=/usr/lib/libnsrora.so';
3> BACKUP INCREMENTAL LEVEL 1 SKIP OFFLINE SKIP INACCESSIBLE DATABASE FORMAT 'df_%d_%U';
4> release channel CH1;}

sql statement: ALTER SESSION SET NLS_DATE_FORMAT="DD.MM.YYYY HH24:MI:SS"

allocated channel: CH1
channel CH1: SID=133 device type=SBT_TAPE
channel CH1: NMDA Oracle v8.2.1

Starting backup at 12-OCT-15
skipping datafile 5; already backed up 6 time(s)
skipping datafile 7; already backed up 6 time(s)
channel CH1: starting incremental level 1 datafile backup set
channel CH1: specifying datafile(s) in backup set



Connor McDonald
October 12, 2015 - 11:54 am UTC

Take a look at:

https://community.oracle.com/thread/2335973?tstart=0

I've also seen a number of posts on Networker forums suggesting there may be a means to do via Networker.

Hope this helps

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.