Oracle集群/非集群JDBC驱动格式

1. Oracle非集群url配置

       非集群中java连接的url

  url=jdbc:oracle:thin:@127.0.0.1:1521:bester

2. Oracle集群中url配置

     (1)Oracle集群中plsql连接配置:

  db_1_2 = ( DESCRIPTION = 

            ( ADDRESS = (PROTOCOL = TCP)(HOST = 59.208.39.193)(PORT = 1521) )

            ( ADDRESS = (PROTOCOL = TCP)(HOST = 59.208.39.195)(PORT = 1521) )

            (LOAD_BALANCE=yes)

            (CONNECT_DATA =

                        (SERVICE_NAME = bester)

             )

           )


      (2)Oracle集群中java程序连接的url

datasource.url = jdbc:oracle:thin:@( DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST =59.208.39.193)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST =59.208.39.195)(PORT = 1521))

    (LOAD_BALANCE=yes)

    (CONNECT_DATA  = (SERVICE_NAME = bester))

)


转自:https://blog.csdn.net/xiaomin1991222/article/details/50979584

你可能感兴趣的:(Oracle集群/非集群JDBC驱动格式)