Skip to content
The latest version of DbVisualizer was released 2024-11-27DOWNLOAD HERE ->

Executing SQL at Connect and Disconnect

Connection hooks defines optional SQL commands that are sent to the database at connect and just before disconnect. They are typically used to initialize the database session with custom settings and to clean up various resources at disconnect.

You can enter the SQL you want to execute in the Properties tab for the connection, in the Connection Hooks category.

You can also set this for all database connection of a certain type. Then you instead do.

  1. Open the Tool Properties window
  2. Under the Database tab, select the specific database and the Connection Hooks category from the tree
  3. Enter the SQL in the shown Database Connection Hooks panel.