Oracle Database Blog: Experiments & Learnings

November 4, 2012

Grid Infrastructure – Connections via listener show different Time-stamp ?

Last Sunday (28 October ’12), there was a time change in NL, from Daylight savings time to Winter time. For few of our databases, connections via listener were showing DST time, while bequeath connections were showing correct time. At Unix level, the time shown was correct. Operating system : AIX 6.1 with TL7.

%echo $TZ

%grep TZ /etc/environment

%ls -ltr /etc/environment
-rw-rw-r-- 1 root system 2037 Jun 20 12:36 /etc/environment

The file /etc/environment was last modified on Jun 20th, lets check when was the listener started ?

%ps -ef |grep tns
 oracle 11010136 1 0 Jun 14 - 2:27 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
 oracle 24248480 18874570 0 21:01:04 pts/0 0:00 grep tns
%ps eww 11010136
 11010136 - A 2:27 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit _=/u01/app/11.2.0/grid/bin/oraagent.bin LANG=C LOGIN=oracle __CLSAGENT_INCARNATION=1... __CLSAGENT_USER_NAME=oracle ... CRS_LIMIT_CORE=unlimited TZ=MET-1METDST CRF_HOME=/u01/app/11.2.0/grid AIXTHREAD_SCOPE=S RT_GRQ=TNS_ADMIN=/u01/app/11.2.0/grid/network/admin/

-- output of above command cut short for readability.

So, the listener was started on Jun 14 with a different TZ setting. This prompted us to perform a listener restart, which corrected the environmental settings of TZ variable for listener but connections via listener still showed DST time. A quick scan of alert log on both RDBMS and ASM revealed that time was still DST. Oracle support pointed us to note 1209444.1, which points out that starting, TZ settings for grid are stored in $GRID_HOME/crs/install/s_crs_config_<node_name>_env.txt . This text file gets populated as per environmental settings during the GRID install.

To fix the problem, we changed TZ variable in the file to exact value pointed to by the OS . This was followed by GI restart. Changed file looks like this:

%more s_crsconfig_<n1>_env.txt
### This file can be used to modify the NLS_LANG environment variable, which determines the charset to be used for messages.
### For example, a new charset can be configured by setting NLS_LANG=JAPANESE_JAPAN.UTF8
### Do not modify this file except to change NLS_LANG, or under the direction of Oracle Support Services

Note: root owns this file, so only root has privileges to edit it.

For Oracle Restart environment, this grid env. settings file is also present under $GRID_HOME/crs/install directory. Any changes to this file would entail a restart of High availability services daemon.


Blog at