【翻译自mos文章】在11gR2 GI中怎么改变时区?

在11gR2 GI中怎么改变时区?

来源于:

How To Change Timezone for 11gR2 Grid Infrastructure (文档 ID 1209444.1)

适用于:

Oracle Database - Enterprise Edition - Version 11.2.0.1 and later

Information in this document applies to any platform.

目标:

本文用于演示在11gR2 GI安装完之后,怎么改变时区?

解决方案:

译者注:

所谓时区,其实分为两个部分:Grid Time Zone Setting 和 OS Default Timezone Setting。下面会分别介绍

Grid Time Zone Setting:

一旦操作系统默认的时区变化了,务必保证如下:

1. 对11.2.0.1来说,grid用户和root用户的 shell environment variable TZ 要被正确的设置

2. 对11.2.0.2以及更高版本来说, $GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt 文件中的TZ entry需要设置为正确的时区

TZ必须是OS支持的TZ,比如说:

grep TZ s_crsconfig_<nodename>_env.txt
TZ=US/Pacific

下面的是一个不正确的TZ的例子,因为里边有不相关的字符(一个不正确的时区设置可能导致诸如通过监听器连接到数据库中session会显示错误的时间)

TZ=%s_Asia/Kuala Lumpur%

在修改前请备份。一旦修改完成并由有权限的用户验证通过,GI可以被重启。

对于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:

改变时区请使用:

/usr/sbin/timeconfig

显示当前时区的状态:

cat /etc/sysconfig/clock
ZONE="America/Los_Angeles"
UTC=true
ARC=false

如下命令显示所有的有效的时区设置:

ls -l /usr/share/zoneinfo

显示于该目录(/usr/share/zoneinfo)的任何时区均是可以用来使用的,比如CST6CDT and America/Chicago

注意:在OL6.3/RHEL6.3中,/etc/sysconfig/clock中的“Zone”field 与 /usr/share/zoneinfo中的有差异。

/usr/share/zoneinfo中的时区信息应该被用于$GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt

hp-ux

显示当前时区的设置:

cat /etc/default/tz
PST8PDT

改变时区:

set_parms timezone  

找到所有有效的时区:

ls -l /usr/lib/tztab

Solaris

显示当前的设置:

grep TZ /etc/TIMEZONE
TZ=US/Pacific

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

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

对于Solaris 11:

在Solaris 11中,/etc/TIMEZONE 这个文件被废弃(obsoleted)。在Solaris 11中,需要通过timezone:default service的方式来修改时区

# svccfg -s timezone:default setprop timezone/localtime= astring: <timezone>
# svcadm refresh timezone:default

AIX:

显示当前的设置:

grep TZ /etc/environment
TZ=GMT

关于AIX上的时区,请参考:

http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/environment.htm

时间: 2024-08-10 15:09:24

【翻译自mos文章】在11gR2 GI中怎么改变时区?的相关文章

【翻译自mos文章】11gR2中的asm后台进程

11gR2中的asm后台进程 参考原文: ASM Background Processes in 11.2 (Doc ID 1641678.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.2 to 11.2.0.4 [Release 11.2] Information in this document applies to any platform. 1 ASMB - ASM Background Process 与as

【翻译自mos文章】11gR2 OUI 在 PREREQUISITE CHECKS 时 hang住

翻译自mos文章:11gR2 OUI 在 PREREQUISITE CHECKS 时 hang住 适用于: Oracle Server - Enterprise Edition - Version 8.0.6.0 to 11.2.0.2.0 [Release 8.0.6 to 11.2] Information in this document applies to any platform. This can occur on any Unix/Linux platform 症状: 11gR2

【翻译自mos文章】rac数据库中,HC_&lt;SID&gt;.dat文件被其他Oracle_Home下的实例所使用。

rac数据库中,HC_<SID>.dat文件被其他Oracle_Home下的实例所使用. 参考原文: RAC database HC_<SID>.dat is used by instance of different Oracle_Home (Doc ID 1618161.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.0 and later Information in this document ap

【翻译自mos文章】oracle db 中的用户账户被锁--查看oracle用户的尝试次数

参考原文: Users Accounts Getting Locked. (Doc ID 791037.1) 其实这个文章是为oracle 别的软件产品写的,不过涉及到user 锁定问题,那还是跟db有关系. 该文章我就不全部翻译了,只翻译最有用的一点: ---lcount列是记录oracle用户用错误的密码登陆db的登陆的次数. Select lcount from SYS.USER$ where name ='<USERNAME>' [翻译自mos文章]oracle db 中的用户账户被锁

【翻译自mos文章】在rac中,使用asmcmd命令从 文件系统 move system datafile 到asm磁盘组的方法

在rac中,使用asmcmd命令从 文件系统  move system datafile 到asm磁盘组的方法. 参考原文: How to move a SYSTEM datafile from filesystem to the ASM diskgroup using ASMCMD on RAC. (Doc ID 1607292.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.3 [Releas

【翻译自mos文章】oracle数据库中 基本的表压缩和高级压缩之间的区别

基本的表压缩和高级压缩之间的区别, 摘录自mos文章Difference Between Basic Table Compression And Advanced Compression (Doc ID 1548187.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.5 and later Information in this document applies to any platform. 目标: What is

【翻译自mos文章】从tablespace中 删除空的datafile时报ora-03262

参考自: Cannot Drop Empty Datafile From Tablespace ORA-03262 (文档 ID 1353029.1) 适用于: Oracle Server - Enterprise Edition - Version: 11.2.0.2 and later   [Release: 11.2 and later ] Information in this document applies to any platform. 症状: ALTER TABLESPACE

【翻译自mos文章】在10g中,当发生ORA-00020时,sqlplus登陆会报“connected to an idle instance”

在10g中.当发生ORA-00020时,sqlplus登陆会报"connected to an idle instance" 来源于: Sqlplus Logon Reports 'connected to an idle instance' when ORA-20 happens in 10g (文档 ID 1370000.1) 说的比較经典, 不做翻译,直接转帖: APPLIES TO: Oracle Server - Enterprise Edition - Version: 1

【翻译自mos文章】为什么GI 的 Rebootless Fencing 会失败?

为什么GI 的 Rebootless Fencing 会失败? 参考自: Why Grid Infrastructure Rebootless Node Fencing Fails (Doc ID 1502282.1) 适用于: Oracle Server - Enterprise Edition - Version 11.2.0.2 and later Information in this document applies to any platform. 目的: Rebootless Fe