oracle 1小时之前,客户端访问数据库时间快了1小时,如何解决?

This note is to illustrate how to change time zone setting for 11.2 Grid Infrastructure after installation.

Fix

Grid Time Zone Setting

Once OS default timezone is changed, make sure:

1. For 11.2.0.1, shell environment variable TZ is set correctly for grid user and root.

2. For 11.2.0.2 and above, TZ entry in $GRID_HOME/crs/install/s_crsconfig__env.txt sets to correct time zone.

The TZ must be exactly as what the OS supports, i.e.:

grep TZ s_crsconfig__env.txt

TZ=US/Pacific

Below is a bad example since there's irrelevant characters (An incorrectly set time zone may cause issues like session shows wrong timestamp when connecting through listener).

TZ=%s_Asia/Kuala Lumpur%

Once it's verified, GI can be restarted with new timezone.

For pre-11.2 CRS, "init.cssd diag" can be used to confirm TZ setting for CRS; init.cssd could be located in /etc/init.d, /etc or /sbin/init.d depend on platform.

OS Default Timezone Setting

Linux

To change: /usr/sbin/timeconfig

To display current setting:

cat /etc/sysconfig/clock

ZONE="America/Los_Angeles"

UTC=true

ARC=false

To find out all valid setting: ls -l /usr/share/zoneinfo

Anything that appears in this directory is valid to use, for example, CST6CDT and America/Chicago.

Note: the "Zone" field in /etc/sysconfig/clock could be different than what's in /usr/share/zoneinfo in OL6.3/RHEL6.3, the one from /usr/share/zoneinfo should be used in $GRID_HOME/crs/install/s_crsconfig__env.txt

hp-ux

To display current setting:

cat /etc/default/tz

PST8PDT

To change: set_parms timezone

To find out all valid setting: ls -l /usr/lib/tztab

Solaris

To display current setting:

grep TZ /etc/TIMEZONE

TZ=US/Pacific

To change, modify TIMEZONE, also run "rtc -z US/pacific; rtc -c"

To find out all valid settings: ls -l /usr/share/lib/zoneinfo

AIX

To display current setting:

grep TZ /etc/environment

TZ=GMT

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值