RMAN

How to Pass Date Format into RMAN

After you set RMAN log location (2 Ways to Set RMAN Log Location), the next problem you will meet is the format of timestamp in the log, which could be too coarse to judge the actual time like this:
08-OCT-12
If you are using sqlplus, you can alter the session and set NLS_DATE_FORMAT to modify the format, but RMAN has no such statement to run, it follows the OS setting, so you must set NLS_DATE_FORMAT on OS-level for RMAN to use.

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

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

Please notice that, there must be no single quote to set the environment variable in Windows platform, otherwise, you will receive an error message in RMAN.

Leave a Reply

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