当前位置:Gxlcms > mysql > Oracle11.2.0.4RAC日志记录的时间与操作系统时间不一致

Oracle11.2.0.4RAC日志记录的时间与操作系统时间不一致

时间:2021-07-01 10:21:17 帮助过:78人阅读

Oracle 11.2.0.4 RAC搭建完成以后,在系统层面做了时区改动之后,发现RAC日志记录的时候与操作系统时间不一致。

Oracle 11.2.0.4 RAC搭建完成以后,在系统层面做了时区改动之后,,发现RAC日志记录的时候与操作系统时间不一致。

其中包括

AWR生成的时间点

数据库alert日志

CRS各种日志

等等

举个例子:

kaycsqdb001r:/u01/app/11.2.0/grid/log/kaycsqdb001r$date

2014-10-16 22:06:24.941:
[/u01/app/11.2.0/grid/bin/orarootagent.bin(3146170)]CRS-2302:Cannot get GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).
2014-10-16 22:06:30.145:
[ohasd(5242990)]CRS-2302:Cannot get GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).
2014-10-16 22:06:30.162:
[gpnpd(5767206)]CRS-2328:GPNPD started on node kaycsqdb001r.
2014-10-16 22:06:33.415:
[cssd(3277140)]CRS-1713:CSSD daemon is started in clustered mode
2014-10-16 22:06:34.856:
[ohasd(5242990)]CRS-2767:Resource state recovery not attempted for 'ora.diskmon' as its target state is OFFLINE
2014-10-16 22:06:44.482:
[cssd(3277140)]CRS-1707:Lease acquisition for node kaycsqdb001r number 1 completed
2014-10-16 22:06:45.853:
[cssd(3277140)]CRS-1605:CSSD voting file is online: /dev/rhdisk2; details in /u01/app/11.2.0/grid/log/kaycsqdb001r/cssd/ocssd.log.
2014-10-16 22:06:50.018:
[cssd(3277140)]CRS-1601:CSSD Reconfiguration complete. Active nodes are kaycsqdb001r kaycsqdb002r .
2014-10-16 22:06:52.856:
[ctssd(3998150)]CRS-2407:The new Cluster Time Synchronization Service reference node is host kaycsqdb002r.
2014-10-16 22:06:52.858:
[ctssd(3998150)]CRS-2401:The Cluster Time Synchronization Service started on host kaycsqdb001r.
2014-10-16 22:06:54.468:
[ohasd(5242990)]CRS-2767:Resource state recovery not attempted for 'ora.diskmon' as its target state is OFFLINE
2014-10-16 22:06:58.959:
[ctssd(3998150)]CRS-2408:The clock on host kaycsqdb001r has been updated by the Cluster Time Synchronization Service to be synchronous with the mean cluster time.
2014-10-16 22:07:04.036:
[/u01/app/11.2.0/grid/bin/orarootagent.bin(6684836)]CRS-5018:(:CLSN00037:) Removed unused HAIP route: 169.254.255.255 / 255.255.0.0 / 169.254.152.93 / en1
[client(3604840)]CRS-10001:16-Oct-14 22:07 ACFS-9391: Checking for existing ADVM/ACFS installation.
[client(3604842)]CRS-10001:16-Oct-14 22:07 ACFS-9392: Validating ADVM/ACFS installation files for operating system.
[client(3604844)]CRS-10001:16-Oct-14 22:07 ACFS-9393: Verifying ASM Administrator setup.
[client(3604846)]CRS-10001:16-Oct-14 22:07 ACFS-9308: Loading installed ADVM/ACFS drivers.
[client(3604852)]CRS-10001:16-Oct-14 22:07 ACFS-9154: Loading 'oracleadvm.ext' driver.
[client(3670458)]CRS-10001:16-Oct-14 22:07 ACFS-9154: Loading 'oracleacfs.ext' driver.
[client(7208994)]CRS-10001:16-Oct-14 22:07 ACFS-9327: Verifying ADVM/ACFS devices.
[client(3670464)]CRS-10001:16-Oct-14 22:07 ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
[client(3670468)]CRS-10001:16-Oct-14 22:07 ACFS-9156: Detecting control device '/dev/ofsctl'.
[client(3670472)]CRS-10001:16-Oct-14 22:07 ACFS-9322: completed
2014-10-16 22:07:19.261:
[crsd(5111996)]CRS-1012:The OCR service started on node kaycsqdb001r.
2014-10-16 22:07:19.303:
[evmd(4456814)]CRS-1401:EVMD started on node kaycsqdb001r.
2014-10-16 22:07:21.026:
[crsd(5111996)]CRS-1201:CRSD started on node kaycsqdb001r.

可以看到,日志写入时间比操作系统时间往近13小时.

这是由于新版本中的一个变化 ,GRID也有属于自己的时区设置。在安装过程中,默认值与操作系统的TZ环境变量相同。

microdb01:/u01/app/11.2.0/grid/crs/install$cat s_crsconfig_microdb01_env.txt
TZ=BEIST-8 <<<<<<<<<<<<<<
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
RT_GRQ=ON
EXTSHM=OFF
TNS_ADMIN=
ORACLE_BASE=

microdb01:/u01/app/11.2.0/grid/crs/install$grep TZ /etc/environment
TZ=Asia/Shanghai <<<<<<<<<<<<<<<<<<系统的时区设置
microdb01:/u01/app/11.2.0/grid/crs/install$

会发现GRID的时区设置与系统环境变量TZ不同了。

解决方法:

编辑s_crsconfig_microdb01_env.txt设置TZ=Asia/Shanghai,重启集群服务即可恢复。

Oracle 11g RAC 本地时间和通过listener连接时间不相同的问题

人气教程排行