Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I've written about SQL Developer on quite a few occasions, it's a tool that I use on an almost daily basis. It's improved tremendously over the years that I've been using it and apart from a few minor docking issues I can't find much fault with it...but I really wish it had an easier way to get the custom JDBC connect URL from a database connection. So if you're reading, Jeff Smith - here's a challenge for you - add a new feature that will generate a snippet of Java code from a SQL Developer database connection that will, using JDBC, connect to that database. Meanwhile, for the rest of us lets see how we can get to the JDBC URL as it stands now...

Update: Jeff did respond and I've updated this post with his solution. It can be found at the bottom of this article.

There is actually a partial JDBC URL visible in the Connection Manager already just to the right of the connection name. It's not the entire URL as required by the JDBC driver, but it can get you there if you memorised the rest of the connect string. Call me lazy, but I've never tried to memorise it so I have to refer to documentation for it.
jdbcurl_1.png


We're not done though. SQL Developer does offer the entire custom JDBC URL already...in its connection export file! For that right click on Oracle Connections, click Export Connections... and follow the wizard to generate a JSON file with all the connection details.
jdbcurl_2.png

jdbcurl_3.png

jdbcurl_4.png




The generated JSON file will contain information about your exported database connections, including their JDBC URLs. Perfect!
jdbcurl_5.png


It's not as straight forward as I'd like it, but it works.

Jeff's Solution -

Jeff's solution is a lot more straight forward. Connect to the database in question and run 'show connection'. It will display all the info you wanted, including the JDBC URL. Perfect! Thanks Jeff!
DsSkgkxXgAAE4S_.jpg-large.jpg


-i

Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...