JDBC url for oracle RAC

Posted by Enrico Giurin Wed, 11 Apr 2007 18:07:00 GMT

If you have to connect to oracle RAC (Real Application Cluster) using JDBC with thin driver, the classic url:
doesn’t work and you get the error ORA – 12505.
Instead, you must use this url:
If you have an oracle client, like toad, check the tsnames.ora for the correct values of SERVICE_NAME and host.

Posted in  | Tags ,  | 22 comments | no trackbacks


  1. Avatar Tel Aviv said 361 days later:

    I kept getting this error over and over. I was hoping that a simple copy paste will solve it, as I just got sooooo annoyed from trying to solve it in the last 2 hours… and praise the lord it worked :) Changing the URLs as u stated did the trick and the connection worked flawlessly.


  2. Avatar feedogator said 377 days later:

    Thanks Enrico , it is very helpful for me

  3. Avatar Sloey said 461 days later:

    Unfortunately for me even this didn’t work. I’m using a WebSphere 5 server with connection pools on a system with a 9i client connecting to a 10g RAC. When the client didn’t work I tried using jdbc as above, however I still get : Connection not available while invoking method queueRequest for resource jdbc/racserver. I can test the connection successfully but can’t create a pooled connection. J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException

  4. Avatar Tú Phạm said 651 days later:

    Thanks alot, this artical help me much

  5. Avatar pmadrid said 692 days later:

    Use this url: jdbc:oracle:thin:@host1^host2:1521:service_name

  6. Avatar Sachin said 817 days later:

    Thanks a lot for the posting.. It helped us to get through

  7. Avatar Kalidass said 1057 days later:

    Some oracle forum posts seems to suggest that there is some issue with DB, but this post really helped.

  8. Avatar Kristyan said 1125 days later:


  9. Avatar Magno said 1341 days later:

    \o/ It’s incredible right!

  10. Avatar gift basket ideas said 1498 days later:

    I still don’t understand what does that really mean.

  11. Avatar ranches for sale said 1528 days later:

    i used to visit your blog and found very in teresting posts on it.best of of luck for your so that you provide us with beautiful comment.

  12. Avatar ranches for sale said 1528 days later:

    i found very awesome comment on your blog so i wish you should come up with more such beautiful comment.

  13. Avatar shiek said 1553 days later:

    This works.. Thanks

  14. Avatar filter elements said 1630 days later:

    the blog post is really the freshest on this noteworthy theme. I harmonize with your conclusions and will thirstily look forward to hear your coming updates. I will tell you something about useful Welded wire mesh,wire meshes and so on.

  15. Avatar vasant_kumbhar@yahoo.com said 1687 days later:


    in the above URL ’@’ stands for what ????

  16. Avatar sriram said 1715 days later:

    Thanks so much. It helped me to fix an issue.

  17. Avatar baohuim said 2101 days later:

    thanks so much ,it works fine for me

  18. Avatar Ofelia said 2202 days later:

    In 1924 Phillip Morris introduces Marlboro as a womans cigarettes with the slogan “Mild as May”. Just as you find cigarette brands staring you in the face from the shelves in the store.

    The Blue label e-cig is a vital part of the Fifty One duo kits section. As of May 2010, a total of 168 countries have ratified the FCTC.

  19. Avatar lidl said 2273 days later:


  20. Avatar 2015topwatches said 2947 days later:

    Just as you find cigarette brands staring

  21. Avatar woman shoes said 2967 days later:

    when you have to attend a lot of parties, you now don’t have to wear the same pair of sandals or shoes just because recession holds you back. Now you can have multiple pars of designer shoes that will absolutely adorn your feet.

  22. Avatar www.skyteamtrade.com said 3111 days later:

    consistently in the seek of new abstracts and innovations to accomplish the superior of their handbags even better.


Use the following link to trackback from your own site:

(leave url/email »)

   Comment Markup Help Preview comment