如何配置oracle客戶端連線10g rac 資料庫

paulyibinyi發表於2008-07-15

在客戶端 tnsnames.ora 檔案加入以下內容

RAC1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.221)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rac.world)
      (INSTANCE_NAME = rac1)

    )
  )
RAC2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.222)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rac.world)
      (INSTANCE_NAME = rac2)

    )
  )

 

tnsping 測試

C:\Documents and Settings\Paul Yi>tnsping rac1

TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 15-JUL-20
08 15:41:54

Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

Used parameter files:
D:\oracle\ora92\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1
.221)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rac.wor
ld) (INSTANCE_NAME = rac1)))
OK (20 msec)

C:\Documents and Settings\Paul Yi>tnsping rac2

TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on 15-JUL-20
08 15:45:16

Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

Used parameter files:
D:\oracle\ora92\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1
.222)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rac.wor
ld) (INSTANCE_NAME = rac2)))
OK (20 msec)

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

相關文章