recursive.codes


The Personal Blog of Todd Sharp

IntelliJ IDEA - Multiple DB Consoles (And Recovering Ones You Didn't Intend To Close)

Posted By: Todd Sharp on 5/25/2017 10:07 GMT
Tagged: IntelliJ IDEA

I use the Database view/plugin in InelliJ IDEA quite often.  It's actually become my "go to" editor for SQL scripts because of it's responsiveness, the fact that it's right there inside my IDE and the code completion and join hints are often times better than the DBMS vendor's offering.  It's pretty easy to open a new console to start writing queries once you've set up a datasource.  You can click the 'SQL Console' icon in the toolbar, or right click on the datasource and choose 'Console':

What some people aren't aware of though is that you can open multiple different consoles against the same datasource by selecting New - Console:


The problem is, once you close any console but the first, the rest become lost forever, right?  Not necessarily.  I had accidentally closed a console this morning that I wasn't finished with and needed to recover that query.  I moused over the tab of another console that I had open and noticed that IDEA showed me the full path to where that file was stored:


Manually navigating to that path showed me all the other consoles that I'd been working with recently!  It's obviously not fail safe, but in a pinch it's a way to recover scripts that you didn't intend to close.


Image by BkrmadtyaKarki from Pixabay



Related Posts

Cloud Deck: Automating and Retrieving Info From Your Cloud Tenancy With a Simple Microcontroller

Cloud Deck: Automating and Retrieving Info From Your Cloud Tenancy With a Simple Microcontroller

Last month, I discovered a really cool project called Stream Cheap that is an inexpensive, DIY version of the wildly popular Stream Deck...

Can You Invoke OCI REST APIs Directly from an Arduino (ESP-32)?

Can You Invoke OCI REST APIs Directly from an Arduino (ESP-32)?

Recently I had a flash of inspiration to build a standalone project on a microcontroller that would invoke OCI APIs directly from the device. I’ve played...

Authenticating Users with Oracle IDCS via OpenId Connect and Micronaut

Authenticating Users with Oracle IDCS via OpenId Connect and Micronaut

Security is the most important aspect of your web application. Fortunately, there are tools available to help make life much easier when dealing with things...

Note: Comments are currently closed on this blog. Disqus is simply too bloated to justify its use with the low volume of comments on this blog. Please visit my contact page if you have something to say!