高可用
prod =
(DESCRIPTION_LIST =
(LOAD_BALANCE = off)
(FAILOVER = on)
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE=OFF)
(FAILOVER=ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.48.10)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod)
(FAILOVER_MODE=(TYPE=session)(METHOD=basic)(RETRIES=4)(DELAY=1))
)
)
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE=OFF)
(FAILOVER=ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.48.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod)
(FAILOVER_MODE=(TYPE=session)(METHOD=basic)(RETRIES=4)(DELAY=1))
)
)
)
jdbc url访问
jdbc:oracle:thin:@(description=(address_list= (address=(host=192.168.48.10) (protocol=tcp)(port=1521))(address=(host=192.168.48.20)(protocol=tcp) (port=1521)) (load_balance=yes)(failover=yes))(connect_data=(service_name= prod)))
plsql个人使用
prod1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.48.10)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod)
)
)
prod2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.48.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod2)
)
)