Home » RDBMS Server » Server Administration » TimeZone Difference (11.2.0.3)
TimeZone Difference [message #639113] Wed, 01 July 2015 19:58 Go to next message
azeem87
Messages: 100
Registered: September 2005
Location: dallas
Senior Member
Hi,

[QA] SYS@QA_SALES2> select systimestamp from dual;

SYSTIMESTAMP
---------------------------------------------------------------------------
01-JUL-15 06.59.57.609612 PM -04:00

[QA] SYS@QA_SALES2> connect abcded/xyz123@QA_SALES
Connected.
[QA] abcded@QA_SALES> select systimestamp from dual;

SYSTIMESTAMP
---------------------------------------------------------------------------
01-JUL-15 06.00.43.178502 PM -05:00



Above 2 select are on same DB, 1 without @DB_name, and 2 with @DB_name,
it's a 2 node RAC set up,
OS and DB is on EST timeszone
but when client or app/tools like sql developer or toad it shows CST.
on furthur looking in to this, 1 file on Clsuster

/local/grid/oragrid/product/11.2.0.3/grid/crs/install
[DEV][oracle@Node2 install]$ cat s_crsconfig_host_name_env.txt
TZ=America/Chicago

Unix SA says this file is owned by root and have not been changed since years..
so what else could be the reason that with DB_Name or apps it shows CST.
do we have to look anything on services/listener etc..

Please advice.
Re: TimeZone Difference [message #639118 is a reply to message #639113] Thu, 02 July 2015 00:10 Go to previous messageGo to next message
Michel Cadot
Messages: 67283
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Post the result of following commands in both servers:
date +'%z'
date -u

Re: TimeZone Difference [message #639137 is a reply to message #639118] Thu, 02 July 2015 02:34 Go to previous messageGo to next message
azeem87
Messages: 100
Registered: September 2005
Location: dallas
Senior Member
From Node1
$ date +'%z'
-0400
[DEV][oracle@Node1 oracle]$ date -u
Thu Jul  2 07:31:35 UTC 2015


From Node2
 date +'%z'
-0400
[DEV][oracle@Node1 oracle]$ date -u
Thu Jul  2 07:33:44 UTC 2015

Re: TimeZone Difference [message #639138 is a reply to message #639137] Thu, 02 July 2015 02:39 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
These are almost always environment variable issues and/or TNS entries being mixed up.

Check that out.

Also, check HOST_NAME from v$instance to make sure you're ACTUALLY on the machine you think you are.
Re: TimeZone Difference [message #639139 is a reply to message #639138] Thu, 02 July 2015 02:46 Go to previous messageGo to next message
azeem87
Messages: 100
Registered: September 2005
Location: dallas
Senior Member
thanks for your, What ENV variables are you referring to
we didn't set anything now..
and what do you want me to look in TNS file, i see the entry for that DB and it's using scan-server/ip in Host section.

HOST_NAME in V$instance shows correct respective host/nodes on both the DB nodes.
Re: TimeZone Difference [message #639140 is a reply to message #639139] Thu, 02 July 2015 02:49 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
ORACLE_SID for one

Check the entry in the tnsnames.ora is pointing at the right machine. Where yours is depends on OS you're using.
icon14.gif  Re: TimeZone Difference [message #639186 is a reply to message #639140] Thu, 02 July 2015 10:42 Go to previous messageGo to next message
azeem87
Messages: 100
Registered: September 2005
Location: dallas
Senior Member
Just wanted to give an update.
we modified below file restarted the cluster nodes, it's fixed we are seeing EST timezone at all places
on box,DB,while connecting through @DB_NAME,

/local/grid/oragrid/product/11.2.0.3/grid/crs/install
[DEV][oracle@Node2 install]$ cat s_crsconfig_host_name_env.txt
TZ=America/New_York

Thanks All for your time.
Re: TimeZone Difference [message #639188 is a reply to message #639186] Thu, 02 July 2015 10:44 Go to previous message
Michel Cadot
Messages: 67283
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Thanks for the solution and feedback.

Previous Topic: Oracle 10g installation Problem
Next Topic: SQL Advisor Job failed
Goto Forum:
  


Current Time: Mon Aug 03 19:49:55 CDT 2020