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;
SYSTIMESTAMP
--------------------------------------------------------------------
04-JUL-14 03.46.03.250689 AM +03:00
sqlplus / as sysdba
SQL> select systimestamp from dual;
SYSTIMESTAMP
--------------------------------------------------------------------
04-JUL-14 10.46.03.250689 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 xxx.sh 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
TZ=.....
accordingly
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:
$ORACLE_HOME/network/admin/endpoints_listener.ora
$ORACLE_HOME/network/admin/listener.ora
and add the line
ENVS='TZ=Europe/Bucharest'
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.
Enjoy!
Niciun comentariu:
Trimiteți un comentariu