2

DBeaver uses MariaDB Connector/J, and the driver disconnects after completing the query.

We are trying to use a MariaDB feature that depends on the session, so we need to run the query and keep the session alive for another query later to gather the performance profiles.

We have a workaround:

  • highlight the SQL statements for running, then
  • run them by "Execute script", Alt + X.

However, we wonder how to keep DBeaver holding on to the same session and not disconnecting after each query.

James
  • 499

1 Answers1

3

This is the way i came up with:

  1. Open new script file, this script file will only be used for keeping connection alive

  2. Execute any query, for example: select now() in this script file

  3. Next in bottom left corner click Refresh and set refresh interval, for example, 300 seconds (5 minutes)

  4. So above query will be executed every 5 minutes and will keep connection alive