:

Change the RMAN Date Format

Question: I’m using Oracle’s RMAN and when I run scripts the date format is truncated, but I want to know the exact time my script started and stopped.

Answer: Follow one of the below, depending upon which platform you are using.

RMAN Date Format on UNIX

Use the SETENV command to set the NLS_DATE_FORMAT variable to the desired format prior to logging on to RMAN.

Example: %setenv NLS_DATE_FORMAT YYYY-MM-DD HH24:MI:SS

RMAN Date Format on Windows

Use the SET command to set the NLS_DATE_FORMAT variable to the desired format prior to logging on to RMAN.

Example: C:\Users> SET NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS

OR, a more permanent way…

Create an NLS_DATE_FORMAT entry in the Windows registry with the desired format. Open the Registry Editor by typing “regedit” from a run command and add the NLS_DATE_FORMAT entry under the LOCAL_MACHINE/SOFTWARE/ORACLE key.

Important Note: If more than one $ORACLE_HOME, you must create the entry under the correct $ORACLE_HOME subkey. For example, LOCAL_MACHINE/SOFTWARE/ORACLE/HOME

I have written another article which contains some RMAN useful commands which might also help you out.

Like it, share it...

Category: RMAN


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *