RAC Connection Redirected To Wrong Host/IP ORA-12545

paulyibinyi發表於2009-04-27

 RAC連線的問題ORA-12545 ,今天一個同事問到我,安裝好oracle 10g rac for aix 後 客戶端
連線到RAC資料庫的時候經常會出現ORA-12545錯誤,在METALINK上查詢了一下,是Oracle的一個小bug。
 
在遠端客戶端連線RAC資料庫時,透過統一的服務名連線時經常會出現ORA-12545錯誤。
SQL> CONN 輸入口令: ******
ERROR:
ORA-12545: 因目標主機或物件不存在, 連線失敗
警告: 您不再連線到 ORACLE。

客戶端TNSNAMES的配置:
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testrac)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
Oracle在文件Note:364855.1:RAC Connection Redirected To Wrong Host/IP ORA-12545中進行了相信的描述。
並給出瞭解決方法:修改資料庫中的初始化引數LOCAL_LISTENER:
SQL> CONN AS SYSDBA輸入口令: ****已連線。
SQL> ALTER SYSTEM
2 SET LOCAL_LISTENER = ‘(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))’  scope=both  SID = ‘rac1′;
系統已更改。
SQL> CONN AS SYSDBA輸入口令: ****已連線。
SQL> ALTER SYSTEM
2 SET LOCAL_LISTENER = ‘(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))’  scope=both SID = ‘rac2′;
系統已更改。
SQL>show parameter list 檢視是否已經修改成功
節點都shut immediate;
startup
lsnrctl stop
lsnrctl start
設定之後,再次嘗試連線資料庫:
SQL> CONN 輸入口令: ******已連線。

看來在10g rac 裝好後,都必須設定這一步,否則客戶端就無法連線了。

以下是metalink  364855.1 文件詳細解釋

 RAC Connection Redirected To Wrong Host/IP ORA-12545 
  文件 ID:  364855.1 型別:  PROBLEM
  上次修訂日期:  01-MAY-2008 狀態:  PUBLISHED

In this Document
  Symptoms
  Cause
  Solution
  References

Applies to:
Oracle Net Services - Version: 9.1 to 10.2
This problem can occur on any platform.
Symptoms
When we try to connect to a RAC service name we sometimes get redirected by the first node's listener to the public address/hostname of the second node instead of its VIP address. An ORA-12545 error may be generated if that public hostname is not configured in DNS.

We were expecting the connection to eventually be redirected to the VIP of the other node.

Cause
The Database on one RAC node remote registers with the wrong local IP address to the listener on the other RAC node (e.g. the public IP address instead of the wanted VIP address).

The PMON process handles database registration to the local and remote listeners. For remote listeners registration PMON will have to find out what is the IP address of the local system in order to present it to the remote listener as database contact address.

In the default Oracle configuration, for hosts which have more than one IP address configured on the network interfaces,  it is undefined which IP address will be selected for remote registration.

Solution
Modify the local_listener database parameter to point to the local VIP address. For the parameter value use either an alias name which contains in the DESCRIPTION field only the VIP address or use an explicit connection statement like the following:
alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))" scope=both sid='instance_name';
 
Where "instance_name" is the unique instance name.   Issue this statement for all instances in the cluster.
The LOCAL_LISTENER database parameter will give PMON a hint in respect of which IP address it should use for remote registration with other nodes' listener(s).
References
Note 235562.1 - Issues affecting Automatic Service Registration
Note 256275.1 - Dynamic Registration Fails On Multiple Network Interface Server
Keywords
RAC; IP~ADDRESS; LOCAL_LISTENER; VIP; REDIRECT; PMON; SERVICE~REGISTRATION;


 

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

相關文章