Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

system timezone change problem with RAC

SOLVED
Go to solution
borut kurnik_1
Frequent Advisor

system timezone change problem with RAC

Hi!

I've got two hp-ux ia64 (11.23) nodes running
Oracle 10.2.0.2 RAC.

At system inst. on one of then i set time zone
MST by mistake. Should have been MET.

At the time nodes were not configured as NTP clients yes, so I didn't notice that until after RAC was up and running.

I changed it and now I have a big problem.

Oracle instance on that node still shows the
MST time (TO_CHAR(SYSDATE,...)).

After the system timezone change I rebooted
the system.

Then I set:
# srvctl getenv database -d hb0
TNS_ADMIN=/cfs/sw01/ora/10.2.0/db1/network/admin
TZ=+01:00

# I set Oracle's TZ variable (listener
runs under oracle user) to the same
value, restarted instance + crs on
that node ...

Nothing seems to help.

Any ideas, please?

Thanks,

Borut












8 REPLIES
Sunil Sharma_1
Honored Contributor

Re: system timezone change problem with RAC

Borut,

You may need to change the time zone at Unix level as well. Try set_parms coomand to change your syste's time zone. This require system reboot so be careful.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
borut kurnik_1
Frequent Advisor

Re: system timezone change problem with RAC

Hi!

Thanks, Sunil.

I've already done that.

In fact, that wast the cause of
it all. I had to change timezone from
MST to MET at the HP-UX level
first, so I did it (and of course
rebooted the system).

Just the Oracle RAC instance on
that node doesn't seem to
'understand' that, so the time
it shows is still MST.

Regards,

Borut


Eric Antunes
Honored Contributor
Solution

Re: system timezone change problem with RAC

Hi borut,

The HP-UX $TZ precedences are (see patch PHCO_34275 special instructions for better understanding):

1) if the environment variable TZ is present, it takes the
precedence.
2) if TZ is not present, then the value contained in
/etc/default/tz is used for default.
3) if /etc/default/tz is not set, then the default value is
equivalent to EST5EDT (Eastern Standard Time) of US.

Best Regards,

Eric
Each and every day is a good day to learn.
Eric Antunes
Honored Contributor

Re: system timezone change problem with RAC

[cont.]

...So how did you set the $TZ variable?

TZ is not an Oracle variable but an HP-UX one and if not set explicitly will default to the value in "/etc/default/tz".

ORA_TZFILE is usally used for Oracle:

export ORA_TZFILE="$ORACLE_HOME/oracore/zoneinfo/timezlrg.dat"

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
borut kurnik_1
Frequent Advisor

Re: system timezone change problem with RAC

Hi!

Thanks, Eric.

My HP-UX timezones are ok (MET) now. I have
no problem there.

The only problem is that Oracle instance on
the node where timezone was incorrect, still
shows the wrong time.

system node1:
=============
# date
Wed Dec 20 12:53:17 MET 2006

system node2:
=============
# date
Wed Dec 20 12:53:23 MET 2006


oracle instance system 1:
=========================
SQL> select dbtimezone from dual;
DBTIME
------
+00:00

SQL> select sessiontimezone from dual;
SESSIONTIMEZONE
---------------
+01:00

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

TO_CHAR(SYSDATE,'
-----------------
20061220 12:54:12

oracle instance at system 2:
============================
SQL> select dbtimezone from dual;
DBTIME
------
+00:00

SQL> select sessiontimezone from dual;
SESSIONTIMEZONE
---------------
+01:00

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

TO_CHAR(SYSDATE,'
-----------------
20061220 06:54:17

As you can see, the both systems
show the same time and timezone
settings, but the Oracle instances
show the same timezone setting but
different time and
the difference between the instances is
6 hrs, which is the difference between
MET and MST.

Regards,

Borut




borut kurnik_1
Frequent Advisor

Re: system timezone change problem with RAC

Thanks, guys!

Hung Pham
Occasional Visitor

Re: system timezone change problem with RAC

Borut,

Did you resolve this issue? If yes, could you share what you did to fix this problem (ie, how to get Oracle to recognize system timezone)?

Thanks,
HP
borut kurnik_1
Frequent Advisor

Re: system timezone change problem with RAC

Hi!

Oh yes, of course. Sorry.

As Eric wrote ....

1) if the environment variable TZ is present, it takes the
precedence.
2) if TZ is not present, then the value contained in
/etc/default/tz is used for default.
3) if /etc/default/tz is not set, then the default value is
equivalent to EST5EDT (Eastern Standard Time) of US.

I updated /etc/default/tz, but I also had
TZ set in one of those nested login procedures.

Just wasn't careful enough...

Regards,

Borut