oracle rac 11.2.0.4兩個(gè)節(jié)點(diǎn)時(shí)間不同步
利津ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!
檢查數(shù)據(jù)庫的時(shí)區(qū)發(fā)現(xiàn)不一樣:
節(jié)點(diǎn)oracle3:
SQL> SELECT TZ_OFFSET(SESSIONTIMEZONE), TZ_OFFSET(DBTIMEZONE) FROM DUAL;
TZ_OFFS TZ_OFFS
------- -------
+08:00 +00:00
節(jié)點(diǎn)Oracle4:
SQL> SELECT TZ_OFFSET(SESSIONTIMEZONE), TZ_OFFSET(DBTIMEZONE) FROM DUAL;
TZ_OFFS TZ_OFFS
------- -------
+00:00 +00:00
然后查看集群時(shí)間同步服務(wù)器,發(fā)現(xiàn)狀態(tài)為觀察模式,正常應(yīng)該為active狀態(tài)!
節(jié)點(diǎn)Oracle3
[oracle@oracle3 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
節(jié)點(diǎn)Oracle4
[oracle@oracle4 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
查看Linux服務(wù)器當(dāng)前時(shí)區(qū)如下命令:
[root@oracle4 ~]# date +"%Z %z"
或者
[root@oracle4 ~]# date -R
具體結(jié)果,如下,發(fā)現(xiàn)不一樣!
節(jié)點(diǎn)Oracle3:
[root@oracle3 ogg]# date +"%Z %z"
UTC +0000
節(jié)點(diǎn)Oracle4:
[oracle@oracle3 ~]$ date +"%Z %z"
CST +0800
修改設(shè)置時(shí)區(qū),我使用的方法2
方法1,然后選擇
tzselect
方法2
復(fù)制相應(yīng)的時(shí)區(qū)文件,替換系統(tǒng)時(shí)區(qū)文件;或者創(chuàng)建鏈接文件
cp /usr/share/zoneinfo/$主時(shí)區(qū)/$次時(shí)區(qū) /etc/localtime
比如,在中國可以使用:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
然后時(shí)區(qū)調(diào)整了之后,再次查看集群時(shí)間同步服務(wù),發(fā)現(xiàn)狀態(tài)為依舊不對
節(jié)點(diǎn)Oracle3
[oracle@oracle3 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
節(jié)點(diǎn)Oracle4
[oracle@oracle4 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
網(wǎng)上有人說需要把Linux的ntpd服務(wù)停掉,查看我的本身就是stop的
[root@oracle3 Asia]# service ntpd status
ntpd is stopped
[root@oracle4 Asia]# service ntpd status
ntpd is stopped
還有人說需要把配置文件刪除,刪除后集群時(shí)間同步服務(wù)狀態(tài)為依舊不對
mv /etc/ntp.conf /etc/ntp.conf.bak
操作完成之后,依舊沒有好,
原來是我的這兩臺機(jī)器的時(shí)間已經(jīng)差太多了,超過1秒就不能同步了,
然后修改時(shí)間為另一臺的,
[root@oracle3 Asia]#date -s "15:41:26 CST"
再次查看ctss時(shí)間同步服務(wù)狀態(tài)為active的了:
[oracle@oracle3 ~]$ crsctl check ctss
CRS-4701: The Cluster Time Synchronization Service is in Active mode.
CRS-4702: Offset (in msec): 1729800
[oracle@oracle4 ~]$ crsctl check ctss
CRS-4701: The Cluster Time Synchronization Service is in Active mode.
CRS-4702: Offset (in msec): 1729800