recursive.codes

recursive.codes

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

Querying Autonomous Database from an Oracle Function (The Quick, Easy & Completely Secure Way)

Querying Autonomous Database from an Oracle Function (The Quick, Easy & Completely Secure Way)

I've written many blog posts about connecting to an Autonomous DB instance in the past. Best practices evolve as tools, services, and frameworks become...

Sending Email With OCI Email Delivery From Micronaut

Sending Email With OCI Email Delivery From Micronaut

Email delivery is a critical function of most web applications in the world today. I've managed an email server in the past - and trust me - it's not fun...

Brain to the Cloud - Part III - Examining the Relationship Between Brain Activity and Video Game Performance

Brain to the Cloud - Part III - Examining the Relationship Between Brain Activity and Video Game Performance

In my last post, we looked at the technical aspects of my Brain to the Cloud project including much of the code that was used to collect and analyze the...

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!