Oracle 11.2.0.4 RAC日誌記錄的時間與作業系統時間不一致

來源:互聯網
上載者:User

Oracle 11.2.0.4 RAC日誌記錄的時間與作業系統時間不一致

Oracle 11.2.0.4 RAC搭建完成以後,在系統層面做了時區改動之後,發現RAC日誌記錄的時候與作業系統時間不一致。

其中包括

AWR產生的時間點

資料庫alert日誌

CRS各種日誌

等等

舉個例子:

kaycsqdb001r:/u01/app/11.2.0/grid/log/kaycsqdb001r$date
Fri Oct 17 11:06:37 CST 2014              <<<這個時間點,開另外一個視窗執行叢集啟動命令
kaycsqdb001r:/u01/app/11.2.0/grid/log/kaycsqdb001r$tail -f al*1r.log      <<<監測日誌輸出
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    <<<<<<<<<<<<<<<GRID的時區設定
 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連線時間不相同的問題 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.