RMAN

How to Set NLS_DATE_FORMAT in RMAN

After you set RMAN log location, the next problem that you will meet is the format of timestamp in the log, which may be too coarse to judge the actual time like this:

08-OCT-12

Set NLS_DATE_FORMAT for RMAN

If you are using sqlplus, you can ALTER SESSION SET NLS_DATE_FORMAT to modify the date format, but RMAN has no such command to run. As a matter of fact, it follows OS setting, so you must set NLS_DATE_FORMAT environment variable on OS-level for RMAN to take.

For UNIX/Linux Platforms

$ export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
$ rman target /
...

For Windows Platforms

> set NLS_DATE_FORMAT=yyyy/mm/dd hh24:mi:ss
> rman target /
...

Please notice that, you cannot use any quotes to set the environment variable in Windows platform, otherwise, you will see errors in RMAN.

Set NLS_LANG for Export / Import

Another environment variable that you may need to set is NLS_LANG in order to export or import data in correct character set.

Leave a Reply

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