JDBC connection to Oracle Clustered

后端 未结 2 1577
轻奢々
轻奢々 2021-01-14 03:48

I would like to connect to a clustered Oracle database described by this TNS:

 MYDB=
 (DESCRIPTION = 
    (ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 41         


        
2条回答
  •  执念已碎
    2021-01-14 04:11

    Apparently you can do this

    jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)
    (ADDRESS=(PROTOCOL=TCP)(HOST=host1)
    (PORT=1521))
    (ADDRESS=(PROTOCOL=TCP)(HOST=host2)
    (PORT=1521))
    (CONNECT_DATA=(SERVICE_NAME=service)))
    

提交回复
热议问题