RMAN error date/time display
I have a interesting task that i can't manage by myself. I would like to change the display format for dates in RMAN errors, not normal RMAN output. In the example, I would like to change the date format in RED color to be
as date format in green color. My NLS_DATE_FORMAT is set to 'DD.MM.YYYY HH24:MI:SS'.
[oracle@oracle12c ~]$ export NLS_DATE_FORMAT='DD.MM.YYYY HH24:MI:SS'
[oracle@oracle12c ~]$ rman target /
[oracle@oracle12c ~]$ backup database;
Starting backup at 26.12.2013 23:27:55
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=/Data/TESTDB/system01.dbf
input datafile file number=00002 name=/Data/TESTDB/sysaux01.dbf
input datafile file number=00003 name=/Data/TESTDB/undotbs01.dbf
channel c1: starting piece 1 at 26.12.2013 23:27:55
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00006 name=/Data/TESTDB/tbstest01.dbf
input datafile file number=00005 name=/Data/TESTDB/usertbs01.dbf
input datafile file number=00004 name=/Data/TESTDB/users01.dbf
channel c2: starting piece 1 at 26.12.2013 23:27:55
RMAN-03009: failure of backup command on c1 channel at 12/26/2013 23:27:56
Rman does not "colorize" the logs, it is your utility (or EM) that somehow is adding the color: RED for failure and green for ok.
Last edited by LKBrwn_DBA; 12-31-2013 at 11:04 AM.
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
the question wasn't about colouring the logs, it was about changing the date format in the highlighted sections
have you tried issuing ...
alter session set NLS_DATE_FORMAT='DD.MM.YYYY HH24:MI:SS'
... just before starting rman? meaning, as part of the same session?
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width