Connect to database using full tnsname with loadbalanced hosts, jdbc

Viewed 146

I have a Oracle 11g RAC enabled database.(Half RAC), from some reasons, they have a load balanced url in the tnsnames.ra. i am not much techy over those details. How can we use such kind of values in the JDBC config?

MYTNS=
            (DESCRIPTION=
            (ADDRESS_LIST=
            (ADDRESS= (PROTOCOL=TCP) (HOST=TEST_DB) (PORT=1521))
            (ADDRESS= (PROTOCOL=TCP) (HOST=MY_DB) (PORT=1521))
            (FAILOVER= TRUE)
                    )
            (CONNECT_DATA=
            (SERVICE_NAME= myservice)
                    )
                );

I just tried the url with one of the host mentioned here, for testing it went in(both). can I leave it that way? or Should I have both host names mentioned? If so how?

1 Answers
Related