标签:release clust toad 服务 连接 sysdba 不一致 images olap
[oracle@oracle-db1 ~]$ date
Tue Oct 10 14:20:56 CST 2017
[oracle@oracle-db1 ~]$ cat /etc/sysconfig/clock
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Shanghai"
[oracle@oracle-db1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Oct 10 14:21:11 2017
Copyright (c) 1982, 2011, 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
SYS@racdb1> select dbtimezone from dual;
DBTIMEZONE
------------
+00:00
SYS@racdb1> select sysdate from dual;
SYSDATE
-----------------------
10-OCT-2017 14:21:28
SYS@racdb1> select current_date from dual;
CURRENT_DATE
-----------------------
10-OCT-2017 14:21:37
SYS@racdb1>
但是用toad或plsql等第三方工具连接的时候就发现SYSDATE慢了三个小时
因为是集群数据库服务器, oracle 11.2.0.3 grid直接读取操作系统时区,
在oracle 11.2.0.3 grid的时区放在$ORACLE_HOME/crs/install/s_crsconfig_hostname_env.txt*这个文件中
查看该文件发现TZ与clock文件的zone值不一样
将两个节点服务的这个配置文件的TZ值改成跟CLOCK文件的值一样,即TZ="Asia/Shanghai"(ROOT用户下)
然后重启集群CRS
Oracle-RAC sysdate和current_date时间不一致,导致客户端连接时间延迟
标签:release clust toad 服务 连接 sysdba 不一致 images olap
原文地址:http://www.cnblogs.com/guipeng/p/7645415.html