• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Change Timezone for Oracle Grid Infrastructure

By admin

This post illustrates how to change timezone setting for Grid Infrastructure after installation.

Note:
To check the current time zone on Linux, use the command: “timedatectl | grep ‘Time zone’”
To check the current time zone on Windows, use the command: “systeminfo | findstr /C:”Time Zone”“

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_[nodename]_env.txt sets to correct time zone.

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

# grep TZ s_crsconfig_[nodename]_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%

Backup before making a change with en editor. Once modified and verified as privileged user, GI can be restarted with new value. 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 depending on the 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
Note: ‘timedatectl‘ command can be used to query and change the system clock/timezone in CentOS/RHEL 7.

– 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 CentOS 6.x/RHEL 6.x, the one from /usr/share/zoneinfo should be used in $GRID_HOME/crs/install/s_crsconfig_[nodename]_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 on x64, modify TIMEZONE, also run below command:

# rtc -z US/pacific; rtc -c

– To find out all valid settings:

# ls -l /usr/share/lib/zoneinfo

For Solaris 11

In solaris 11 the /etc/TIMEZONE file is obsoleted. This is now done via the “timezone:default” service:

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

AIX

– To display current setting:

# grep TZ /etc/environment
TZ=GMT

Filed Under: Linux, oracle, RAC, Solaris

Some more articles you might also be interested in …

  1. How to Integrate CentOS/RHEL system into an AD Domain with LDAP/Kerberos/SSSD
  2. Active FTP vs. Passive FTP
  3. Oracle Database – How to recover from a lost datafile with no backup
  4. What roles can be set as default for a user in Oracle Database
  5. CentOS / RHEL : How to remove unused Physical Volume(PV) from Volume Group (VG) in LVM
  6. Filesystems Are Not Getting Mounted in Order on CentOS/RHEL 7
  7. How To Use ‘zpool split’ to Split rpool in solaris 11 (x86/x64)
  8. How to Reduce an LVM volume on Ubuntu
  9. How To Configure Separate Override.conf For Multiple MySQL Instances Using Systemd
  10. Solaris Resource Manager Basics : Understanding Resource Pools

You May Also Like

Primary Sidebar

Recent Posts

  • MySQL: how to figure out which session holds which table level or global read locks
  • Recommended Configuration of the MySQL Performance Schema
  • MySQL: Identify what user and thread are holding on to a meta data lock that is preventing other queries from running
  • MySQL: How to kill a Long Running Query using max_execution_time
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary