[[Email protected] ~]$ Date
Tue Oct 14:20:56 CST 2017
[Email protected] ~]$ Cat/etc/sysconfig/clock
# The time zone of the system is defined by the contents of/etc/localtime.
# This file was only for evaluation by System-config-date, does not rely in its
# contents elsewhere.
Zone= "Asia/shanghai"
[Email protected] ~]$ Sqlplus/as SYSDBA
Sql*plus:release 11.2.0.3.0 Production on Tue Oct 10 14:21:11 2017
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the partitioning, Real application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real application testing options
[Email protected]> select dbtimezone from dual;
Dbtimezone
------------
+00:00
[Email protected]> select sysdate from dual;
Sysdate
-----------------------
10-oct-2017 14:21:28
[Email protected]> select current_date from dual;
Current_date
-----------------------
10-oct-2017 14:21:37
[Email protected]>
But when connected with third-party tools such as Toad or Plsql, Sysdate is three hours slow.
Because it is a clustered database server, the Oracle 11.2.0.3 Grid directly reads the operating system time zone,
The time zone of the ORACLE 11.2.0.3 grid is placed in the $oracle_home/crs/install/s_crsconfig_hostname_env.txt* file
View this file found TZ is not the same as the zone value of clock file
Change the TZ value of this configuration file of two node service to the same value as the clock file, i.e. tz= "Asia/shanghai" (root user)
Then restart the cluster CRS
Oracle-rac Sysdate and current_date time are inconsistent, resulting in a delay in client connection time