Switch Database Console / Connection

Answered

I would like to know if there is a shortcut key to switch between the different db connections.

 

For example I have have a file, which I want to run in under one database connection, then another one. Now I have to use the mouse to click between the different DB connections, but knowing Jetbrains, there is a shortcut - but I am unable to find it.

1
4 comments

Hi,
There is no any shortcut key for it.
I've created issue: https://youtrack.jetbrains.com/issue/DBE-4454


Thank  you.

0

Hi,

Using this functionality, I can only switch between sessions within the same DB connection, but I would like to attach the console to another DB connection (i have plenty configured and a few connected). It seems the OP was able to do that but I can't.  Is there a setting I can change?

I'm using IntelliJ IDEA Ultimate 2020.3.1

Thanks

0

Francois Dumas,

You can write your SQL query in a SQL file and change DB connection.

1

Thanks, vasily chernov that's the bit that I was missing!

I can attach to a separate connection when working in an SQL file wich is not a "Query console file" automatically generated as console#.sql.  I wished I could do the same with a console#.sql file but at least now I know how to work if I want to use this feature (I can get into the habit of working with SQL statch files instead).  :)

1

Please sign in to leave a comment.