Monday 27 June 2011

Oracle RAC instance showing different times

We had a situation where the database timezone was set to Australia/Sydney while the server timezone was local New Zealand time. The users were complaining that they were seeing local New Zealand time when they were connected to Instance 1 while it was showing Australia/Sydney time when connected to Instance 2.

The following query returned the right time regardless to whichever instance the user connected:
select systimestamp AT TIME ZONE dbtimezone from dual;

However, when the issued the folowing, the times returned were different on both instances:
select systimestamp from dual;

After doing some investigation, it was found that the reson for this was that Instance 1 was started via SQLPLUS and while Instance 2 was started using the srvctl.
Hence, the database was shutdown and started using srvctl which fixed the issue.

No comments:

Post a Comment