Monday, December 30, 2019

Database Alert.log or ASM Alertlog File Showing Wrong Date or Wrong Datetime or Wrong time (Doc ID 1557371.1)





APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

GOAL

To solve the issue of wrong datetime or wrong time in the Database Alert.log or ASM Alertlog file showing on RAC/Grid/Standalone environment
May not have any issue with sysdate systimestamp.
Most of the time, this issue is seen after recent server reboot

SOLUTION

 The time used for the message in the alertlog is the same as "sysdate" for the process that is writing to the alert.log. Alert.log messages are not written by "Oracle" they are written by the Oracle process that is responsible for that error/message (including user sessions, ASM processes, or any other background processes). This has nothing to do with the database timezone, session time etc. So one has to check the OS level TZ settings and Grid/Cluster level Timezone settings, if those are proper, because in some situations incorrect timezone on RAC and Grid may also causes the wrong datetime in alert.log
Possible Action plan is to go through the entire Note 227334.1 and Note 340512.1 check the timezone and date settings are proper.
Please refer the section "My Alert.log has wrong time for some or all entry's" in the Note 227334.1 present in the References Section
Please refer the section "How do I see & set the TZ environment variable in a RAC environment" in the Note 227334.1
Please refer the section "How to see and define the timezone when using Grid Infrastructure (start the database using crsctl )?" in the Note 227334.1
Please refer the section "How to define the timezone for ASM logging (including ASM messages in the alert.log of the database)?" in the Note 227334.1
Sometimes this issue can happen with the listener and database time may not match, as explained in the Note Note 227334.1 in section "My Alert.log has wrong time for some or all entry's", In that case you can follow the below action plan
shutdown listener
shutdown database
set ORACLE_HOME and ORACLE_SID properly
check and set the OS level TZ settings
then start the database
then start the listener
Please go through the entire Note 227334.1 and Note 340512.1 check the timezone and date settings are proper.
If you are in the RAC/CRS/GRID Infrastructure, Please also follow the Notes below
Note 1390015.1   Incorrect SYSDATE shown when connected via Listener in RAC
Note 1209444.1   How To Change Timezone for 11gR2 Grid Infrastructure

No comments:

Post a Comment