Wednesday, March 14, 2018

Difference output while querying systimestamp within server and from client



Difference result while querying systimestamp within server and from client

Issue: -

The below query is different data if the query executes within the server and from outside of the server (through client).

select systimestamp from dual;
systimestamp, sysdate give the server date and time.

Reason: -
Cluster and database installed in the server if different time zone and the time zone changed later in the server. Cluster keeps the time zone information at the time of installation.
If the time zone changed, we have to update the same information in the cluster.

1)Edit the file in “s_crsconfig__env.txt” in $GRID_HOME/ crs/install.
Change the TZ value accordingly.
Example to change the timezone from Malaysia to India,
TZ=Asia/Kuala_Lumpur  (Old Value)
TZ=Asia/Kolkatta (New Value)

2)Update the information through srvctl in crs file.
srvctl setenv database -d -T TZ=Asia/Kolkatta

3)Restart the cluster

No comments:

Post a Comment