EBS R12.1 FOR linux 資料庫監聽很慢的一個解決方法

zhulch發表於2009-11-25

環境:

- Oracle EBS R12.1.1

- Linux 5.3

詳細內容請看如下

[@more@]

故障現象:

- tnsping VIS 延時很長,不能忍受的地步

- 應用層面啟動不成功

分析過程:

- 檢查/etc/hosts, 把IP6的相關內容註釋掉,因為根本沒用到IP6

- ping localhost 很快

- ping hostname 很快,並且能夠解析

- cd $ORACLE_HOME/nework/context_name/admin/tnsnames.ora,sqlnet.ora,lisenter.ora 檔案檢查,試圖把hostname 換成IP,結果還是不理想

- telent hostname 1521 速度很快

- server 上sqlplus "/as sysdba"速度很快

- server sqlplus 速度很慢

%100 確定監聽出了問題

- tracerouter hostname 就一跳 ,,應該沒問題

- metlink上查詢相關檔案,懷疑有BUG存在..

- 找到類似的 What was changed between the two is the way Oracle resolves hostnames to IPs, more specifically the system call used to do that.

Oracle 11g use now getaddrinfo() while 10g used gethostbyname().

These system functions requires different configuration in /etc/nsswitch.conf.

gethostbyname() require the use of keyword "hosts" while getaddrinfo() the use the keyword "ipnodes"


This happens even if Name Server Switch configuration (nsswitch) specifies the hosts file prior to dns lookups:

/etc/nsswitch.conf
hosts: files [NOTFOUND=continue] dns
or only:
hosts: files 這樣的DOC..

- 看來是因為Server 本身的DNS起作用了,DNS一起作用,hosts就有問題了

- /etc/resolv.conf

;generated by /usr/sbin/oraclevm-template
#search hostname

#options timeout:15
#options timeout:15
#nameserver hostname

全去掉,或者乾脆把resolv.conf move 掉

- 最後把/etc/sysconfig/network中IP6相關的東西都去掉了

再測試,就OK了

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

相關文章