If you have to connect to oracle RAC (Real Application Cluster) using JDBC with thin driver, the classic url:
jdbc:oracle:thin:@<HOST>:1521:<SID>
doesn’t work and you get the error ORA – 12505.Instead, you must use this url:
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)There is also an article discussing this here.
(ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=host2) (PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
7 comments:
Nice work!!! This post saves my day.
Cool blog as for me. I'd like to read more about that theme. The only thing I would like to see here is a few pictures of such gizmos as gps blocker.
It worked like a champ. When I started searching in google I was worried I may get too many results or none at all. Somehow it hit this first. Many thanks, it saved me valuable time.
Regards,
Murali
Newark, DE
Great, glad it helped.
Thanks ... that was the missing piece. It looks a lot like the tnsnames entry, saved me oodles of time!
- Peter
Thanks ! -Vinod
Thanks ! It helped us!
-Vinod
Post a Comment