vineri, 4 iulie 2014

Different time between connected through listener and connected locally. RAC Infrastructure 11gR2

I don't know if the problem arises with the 11gR2 or was there, under the previous releases. If you experience this problem with no matter which previous release, i suppose the workaround is ok.
The issue is below one:

sqlplus sys@tnsname as sysdba
SQL>  select systimestamp from dual;
04-JUL-14 AM +03:00

sqlplus / as sysdba

SQL>  select systimestamp from dual;
04-JUL-14 AM +03:00

Unfortunately, all the OLTP applications you will use to populate your database will work through listener, and having a wrong timestamp reference can be very annoying for the users.

Briefly, the workaround:

connect as root and:

1. change the TZ variable. In order to make this permanent, after every single machine startup, you have to put a script under the  /etc/profile.d   folder (doesn't matter the name of the script, make it  and will run).

export TZ=Europe/Bucharest  (of course, you will provide the desired timezone)

2.  edit the $ORACLE_HOME/crs/install/s_crsconfig_name-of-your-instance_env.txt    where the ORACLE_HOME is the GRID_HOME

change the line


I don't know why, whatever you set, conercning the system timezone or database timezone, here you will find, by default, America/NewYork.

Now, connect as oracle user and edit the below files:


and add the line


Again, be aware of your correct data.

By some people, now you have just to bounce the listener or the ohasd services.

/etc/init.d/ohasd stop
/etc/init.d/ohasd start

For me, didn't work. I restarted all the operating systems of all the instances in order to achieve the purpose.


Niciun comentariu:

Trimiteți un comentariu