oracle 时间延后分钟,Oracle-RAC sysdate和current_date时间不一致,导致客户端连接时间延迟...

[[email protected] ~]$ date

Tue Oct 10 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 is only for evaluation by system-config-date, do not rely on 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, 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

[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

但是用toad或plsql等第三方工具连接的时候就发现SYSDATE慢了三个小时

4ec7a7ec6f85bcb9bd123a683c0ead6e.png

因为是集群数据库服务器, oracle 11.2.0.3 grid直接读取操作系统时区,

在oracle 11.2.0.3 grid的时区放在$ORACLE_HOME/crs/install/s_crsconfig_hostname_env.txt*这个文件中

查看该文件发现TZ与clock文件的zone值不一样

4414e40ef8a4af73b938b1b3395c995f.png

将两个节点服务的这个配置文件的TZ值改成跟CLOCK文件的值一样,即TZ="Asia/Shanghai"(ROOT用户下)

然后重启集群CRS

原文:http://www.cnblogs.com/guipeng/p/7645415.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值