Can we specify the failover in tnsnames.ora? Is this the correct way to do?
So in our hibernate.properties file we will just specify the url as
Code:
<connection-url>jdbc:oracle:thin:@DBNAME</connection-url>
And in our tnsnames.ora, we will specify the failover as
Code:
DBNAME=
(DESCRIPTION=
(ADDRESS_LIST=
(FAILOVER=on)
(LOAD_BALANCE=off)
(ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))
)
(CONNECT_DATA=(SERVICE_NAME=DBNAME))
)
Is this the correct way to do?