RAC下主機修改時區導致db無法open

巡完南山巡南山發表於2019-01-28

11.2.0.4.rac 主機修改時區導致db無法open 

os:redhat linux

db:11.2.0.4 rac

desc:crs啟動後,除db外都可以正常啟動。

檢視crs和db的log,檔案最後修改時間跟主機時間一致,但log裡的時間不一致,如下為crs和dblog裡的日誌


crs log

==========================================

2015-05-04 10:30:24.139:

[client(19430)]CRS-4743:File /u02/app/11.2.0/grid/oc4j/j2ee/home/OC4J_DBWLM_config/system-jazn-data.xml was updated from OCR(Size: 13365(New), 13378(Old) bytes)

2015-05-04 10:31:33.583:

[cssd(18287)]CRS-1601:CSSD Reconfiguration complete. Active nodes are gzsjdb1 gzsjdb2 .

2015-05-04 10:31:56.583:

[crsd(19096)]CRS-2772:Server 'gzsjdb2' has been assigned to pool 'Generic'.

2015-05-04 10:31:56.584:

[crsd(19096)]CRS-2772:Server 'gzsjdb2' has been assigned to pool 'ora.jzxn'. #出問題時日誌

2015-05-04 16:31:02.619: #問題解決後的日誌

[client(26295)]CRS-10051:CVU found following errors with Clusterware setup : PRVF-7573 : Sufficient swap size is not available on node "gzsjdb1" [Required = 16GB (1.6777216E7KB) ; Found = 10GB (1.0485752E7KB)]

PRVF-5415 : Check to see if NTP daemon or service is running failed

PRVG-1101 : SCAN name "scan-cl


db log

============================

Fri Jun 12 03:45:16 2015 #出問題時日誌

Thread 1 advanced to log sequence 54 (LGWR switch)

  Current log# 3 seq# 54 mem# 0: /oradata/oradata/jzxn/redo03.log

Fri Jun 12 03:47:38 2015

Thread 1 cannot allocate new log, sequence 55

Checkpoint not complete

  Current log# 3 seq# 54 mem# 0: /oradata/oradata/jzxn/redo03.log

Fri Jun 12 03:47:43 2015

opidcl aborting process unknown ospid (29020) as a result of ORA-28

Fri Jun 12 05:13:24 2015

Thread 1 advanced to log sequence 55 (LGWR switch)

  Current log# 1 seq# 55 mem# 0: /oradata/oradata/jzxn/redo01.log

Fri Jun 12 14:31:04 2015  #問題解決後的日誌

Starting ORACLE instance (normal)

************************ Large Pages Information *******************

Per process system memlock (soft) limit = UNLIMITED


Total Shared Global Region in Large Pages = 0 KB (0%)



解決過程:起初沒有注意這個時間問題,對crs重啟後,仍然是db的資源不正常,後發現日誌時間不對,經詢問專案組節點2由預設時間(Etc/GMT-1)改為東8區(Asia/Shanghai)的時區後,節點2就無法連線db,節點1修改時區後仍可連線。直至今天節點1也無法連線db.


出現db日誌、crs日誌等和主機時間不一致,是因為在rac新頒佈中,grid也有屬於自己的時區,在安裝過程中,預設值與作業系統的TZ環境變數相同。

本例是因為時間不一致,導致db無法open,修改grid時區後,重啟crs,db可以正常open.


1.檢視系統時區

$cat /etc/sysconfig/clock

ZONE=Asia/Shanghai

2.檢視crs裡配置的時區

[root@gzsjdb1 install]# cat s_crsconfig_gzsjdb1_env.txt.bak

### 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=Etc/GMT-1 #仍然為預設的美國時區

NLS_LANG=AMERICAN_AMERICA.AL32UTF8

TNS_ADMIN=

ORACLE_BASE=


3.修改crs的時區為Asia/Shanghai

[root@gzsjdb1 install]# cat s_crsconfig_gzsjdb1_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/Shanghai

NLS_LANG=AMERICAN_AMERICA.AL32UTF8

TNS_ADMIN=

ORACLE_BASE=

[root@gzsjdb1 install]# pwd

/u02/app/11.2.0/grid/crs/install

[root@gzsjdb1 install]#


4.重啟crs

5.經驗證crs日誌,db日誌等都與主機保持一致,透過plsqldev可以登入資料庫。

[root@gzsjdb2 ~]# date

Fri Jun 12 15:12:58 CST 2015


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26964624/viewspace-2565013/,如需轉載,請註明出處,否則將追究法律責任。

相關文章