ORACLE RAC資料庫連線方式

2021-08-26 19:49:17 字數 1153 閱讀 2897

方法1:適合中介軟體等jdbc等連線方法,本示例為thin方式

url="jdbc:oracle:thin:@(description =

(load_balance = no)

(address = (protocol =tcp)(host = dtydb3-vip)(port = 1521))

(address = (protocol =tcp)(host = dtydb4-vip)(port = 1521))

(address = (protocol =tcp)(host = dtydb5-vip)(port = 1521))

(address = (protocol =tcp)(host = dtydb6-vip)(port = 1521))

(connect_data =

(service_name = srv_kfpb1)

同時需要修改/etc/hosts檔案,新增如下內容

#vip

10.4.×.* dtydb3-vip

10.4.×.* dtydb4-vip

10.4.×.* dtydb5-vip

10.4.×.* dtydb6-vip

方法2:一般用於sqlplus、plsql等客戶端工具

$oracle_home/network/admin/tnsnames.ora檔案中新增如下內容

tydb_kfpb1 =

(description =

(load_balance = no)

(address = (protocol =tcp)(host = 10.4.×.*)(port = 1521))

(address = (protocol =tcp)(host = 10.4.×.*)(port = 1521))

(address = (protocol =tcp)(host = 10.4.×.*)(port = 1521))

(address = (protocol =tcp)(host = 10.4.×.*)(port = 1521))

(connect_data =

(service_name= srv_kfpb1)

然後直接使用tydb_kfpb1進行連線

備註:黃色部分修改為自己需要的服務名

ORACLE RAC資料庫連線方式

方法1 適合中介軟體等jdbc等連線方法,本示例為thin方式 url jdbc oracle thin description load balance no address protocol tcp host dtydb3 vip port 1521 address protocol tcp h...

JDBC連線oracle RAC資料庫配置

rac的配置如下 rac服務名為oratest 我的應用伺服器為apache tomcat 配置過程如下 1 搜尋了一下,發現提供的連線rac方法很多,拷貝了如下的jdbcurl jdbc oracle thin description address list address host 192.1...

Oracle RAC資料庫維護

root user node1 oracle crs bin crsctl check crs 檢查crs狀態,建議每次操作前都做該status命令檢查 oracle crs bin crsctl stop crs 關閉該節點上的crs服務 node2 oracle crs bin crsctl c...