SYSDATE Return Error time in RAC Environment

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.