Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Strange inconsistency between Oracle 11gRAC logging time and operating system time

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment:

Suse 11sp4

Oracle 11.2.0.4 RAC

After installing the software and patches, check the time and find that the time difference between the two hosts is 5 hours.

Adjust the system time and adjust the two hosts to the same point in time.

Date-s' 2017-03-18 111V 23purl 00'

Restart the host after adjustment, check and find that the host time is consistent. Check the cluster alert log and find that the log file time is inconsistent with the output time in the log.

According to past experience, it must be caused by inconsistent grid time. Check the two hosts and find that the cluster time zone is normal. The information is as follows:

Grid@jdXXXac1:/oracle/XXXXXXXX/grid/crs/install > more s_crsconfig_jdXXXac1_env.txt

# This file can be used to modify the NLS_LANG environment variable, which determines the charset to be used for messages.

# For example, a new charset can be configured by setting NLS_LANG=JAPANESE_JAPAN.UTF8

# Do not modify this file except to change NLS_LANG, or under the direction of Oracle Support Services

TZ=Asia/Aden

NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1

TNS_ADMIN=

ORACLE_BASE=

Check the hardware time of the host and find that the hardware time difference between the two hosts is five hours. The check method is as follows:

Hwclock-show

The synchronization hardware time is the same as the system time, and the synchronization method is as follows:

Hwclock-hctosys

Restart the host after adjustment, and it is found that the log file time of the cluster alert log is still inconsistent with the output time in the log.

Online query Asia/Aden location in Aden Aden [Yemen] (with Beijing East eighth District Standard time difference), and Beijing Standard time difference of 5 hours, it is speculated that the system time zone may be misconfigured.

Check the system time zone as follows:

Jdwebrac2:/home/icbccs # more / etc/sysconfig/clock | grep TIMEZONE

TIMEZONE= "Asia/Shanghai"

DEFAULT_TIMEZONE= "US/Eastern"

JdXXXac1:/home/icbccs # more / etc/localtime

TZif2

CST-8

JdXXXac1:/home/icbccs # more / etc/sysconfig/clock | grep TIMEZONE

TIMEZONE= "Asia/Aden"

DEFAULT_TIMEZONE= "US/Eastern"

JdXXXac1:/home/icbccs # more / etc/localtime

TZif2

CST-3

As speculated, adjust the system time zone:

Adjust the node 1 clock file to the correct time zone.

TIMEZONE= "Asia/Shanghai"

Rm-f / etc/localtime

Ln-sf / usr/share/zoneinfo/Asia/Shanghai / etc/localtime

After restarting the host, check that the system time is correct, and it is found that the cluster alert log finds that the log file time is still inconsistent with the output time in the log.

Adjust the grid time to "Asia/Shanghai" and the file to $ORACLE_HOME/crs/install/s_crsconfig_ `hostname`.txt

After restarting the host after adjustment, check the cluster alert log and find that the log file time is still inconsistent with the output time in the log.

Re-check the system time zone, system time, hardware time, and grid time zone, and find that the hardware time is inconsistent with the system time. After resynchronizing the hardware time, restart the crs cluster and return to normal.

Hwclock-hctosys

Summary: with the promotion of the use of Oracle, many people will ignore some pre-condition checks during the installation of database clusters, resulting in various time-related failures after database installation. It is recommended to check the prerequisites when installing the cluster, especially the time and time zone.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 274

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report