Home > Oracle > CRS Timezone

CRS Timezone


Interesting problem – database was running normally without any issues and added to OCR.  But the log file started reporting a different time for all activities – for example.

Database and server is showing a time 4:25 while alertlog is ahead of 5 hours @9:25!

<pre>
oracle@prod # tail alert_xxxxxxx.log

Recovery of Online Redo Log: Thread 2 Group 16 Seq 129057 Reading mem 0

  Mem# 0: +ORAINDEX1/prod/onlinelog/group_16.282.864560747

Mon Jan 12 09:20:39 2015

Media Recovery Waiting for thread 1 sequence 129049 (in transit)

Recovery of Online Redo Log: Thread 1 Group 15 Seq 129049 Reading mem 0

  Mem# 0: +FLASH/prod/onlinelog/group_15.5059.864560603

Mon Jan 12 09:20:55 2015

Both database and server was showing almost 5 hrs less than the alert long entries.


oracle@prod  # date

Mon Jan 12 04:26:34 EST 2015



SQL> select to_char(sysdate,'DD-Mon HH24:MI:SS') from dual;



TO_CHAR(SYSDATE,'DD-MONHH24:MI:SS')

---------------------------------------------------------------------------

12-Jan 04:28:46

Also, found the CSSD log is showing 5 hrs ahead of DB and server time!

 


grid@prod # tail ocssd.log

2015-01-12 09:12:16.373: [    CSSD][24]clssnmSendingThread: sending status msg to all nodes

2015-01-12 09:12:16.373: [    CSSD][24]clssnmSendingThread: sent 4 status msgs to all nodes

2015-01-12 09:12:20.375: [    CSSD][24]clssnmSendingThread: sending status msg to all nodes

2015-01-12 09:12:20.375: [    CSSD][24]clssnmSendingThread: sent 4 status msgs to all nodes

2015-01-12 09:12:24.377: [    CSSD][24]clssnmSendingThread: sending status msg to all nodes

2015-01-12 09:12:24.377: [    CSSD][24]clssnmSendingThread: sent 4 status msgs to all nodes

2015-01-12 09:12:28.379: [    CSSD][24]clssnmSendingThread: sending status msg to all nodes

2015-01-12 09:12:28.379: [    CSSD][24]clssnmSendingThread: sent 4 status msgs to all nodes

2015-01-12 09:12:32.381: [    CSSD][24]clssnmSendingThread: sending status msg to all nodes

2015-01-12 09:12:32.381: [    CSSD][24]clssnmSendingThread: sent 4 status msgs to all nodes

The problem was – the server was setup with a time zone  TZ=US/Eastern while the CRS was installed with the time zone GMT.  You can check the CRS time zone at $GRID_HOME/crs/install/ s_crsconfig_<SERVER NAME>_env.txt

<pre>
grid@ #  more s_crsconfig_xxxxxx_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


TZ=GMT

NLS_LANG=ENGLISH_UNITED KINGDOM.WE8ISO8859P1

Then, why the database was showing same as server time?  Being a CRS resource, should have been inherited the CRS time?  Remember, you can configure the database with a different time zone other than the CRS timezone – means in the same server – each database can take its own timezone.  You can view / set time zone for a database by

 


oracle@prod # srvctl getenv database -d xxxxxx

xxxxxx:

TZ=EST5EDT

LIBPATH=/xxxs/app/oracle/product/11.2.0/db_1/lib

 

So, even though CRS time zone is GMT, database level timezone is set to EST5EDT which is US/Eastern.

You may set DB level timezone by


srvctl setenv database -d <dbname> -t 'TZ=<the required time zone>'

 

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: