A customer reported that in RAC of 11.2.0.3, it is correct to query the time returned by sysdate when using sqlplus to connect. However, when using PLSQL to connect through Listener, the error time is returned. In fact, the reason for this problem is the new feature after 11.2.0.2: In 11.2.0.1, the TZ variable depends on the grid and the shell ring of the root user.
A customer reported that in RAC of 11.2.0.3, it is correct to query the time returned by sysdate during sqlplus connection, but when PL/SQL is used for Listener connection, returns the error time. In fact, the reason for this problem is the new feature after 11.2.0.2: In 11.2.0.1, the TZ variable depends on the grid and the shell ring of the root user.
A customer reported that in RAC of 11.2.0.3, it is correct to query the time returned by sysdate during sqlplus connection, but when PL/SQL is used for Listener connection, returns the error time.
In fact, the cause of this problem is the new features after 11.2.0.2:
In 11.2.0.1, the TZ variable depends on the grid and the root user's shell environment variable TZ.
However, starting from 11.2.0.2, the Oracle cluster (GI) has its own time zone and configuration, that is, the TZ parameter has $ GRID_HOME/crs/install/s_crsconfig _ The time zone set in _env.txt.
[grid@11gR2 install]$ cat s_crsconfig_11gr2_env.txt### This file can be used to modify the NLS_LANG environment variable, which determines the charset to be used for messages.### For example, a new charset can be configured by setting NLS_LANG=JAPANESE_JAPAN.UTF8### Do not modify this file except to change NLS_LANG, or under the direction of Oracle Support ServicesTZ=Asia/ShanghaiNLS_LANG=AMERICAN_AMERICA.AL32UTF8TNS_ADMIN=ORACLE_BASE=
Generally, the time zone of a cluster is obtained from the system when GI is installed. After communication, the customer did change the system time zone some time ago. The reason why sysdate returns an error is that when the operating system time zone changes, the GI time zone does not change.
For specific modifications, see MOS: How To Change Timezone for 11gR2 Grid Infrastructure (Doc ID 1209444.1)
Original article address: SYSDATE Return Error time in RAC environment. Thank you for sharing it with the original author.