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连接时间不相同的问题