Connection Types
Table of contents
Connection types define how DBeaver behaves regarding:
Default transactions commit mode - with or without automatic commit of changes to the database.
NOTE: You can override the default commit behavior during your work with connections by changing the commit mode, see Auto and Manual Commit Modes.
SQL statements execution (with or without user confirmation): If set to the required user confirmation for SQL execution, DBeaver shows a confirmation message every time you attempt to execute a ‘transaction’ type of query (INSERT/DELETE/UPDATE, etc.):
For your convenience, DBeaver supports color-coding of connection types so that you know at once which behavior to expect when you use a certain connection. The screenshot below visualizes how the color coordinated database connections are used in Database Navigator and Projects views as well as editors related to these connections:
To manage connection types for a database connection, in the Database Navigator or Projects view, click the connection to set the focus on it and then press F4 to open the connection properties window. Then, in the properties window, in the navigation pane on the left, click General to see the general settings. You can see Connection Type field among the settings:
There are three default connection types – Development, Test, and Production. You can change the connection type for your database connection as well as you can create a new connection type, edit or delete an existing one.
Change Connection Type
By default, the Development connection is preset for all database connections. You can change the connection type to one of the default connection types or to a custom type, if there are any.
To change the connection type:
In the connection properties window, on the General page, click the Connection type field and then click the connection type in the dropdown list:
To test the connection, click Test Connection. To confirm the change, click OK.
Create Connection Type
To create a connection type:
In the connection properties window (F4 on a connection), on the General page, click Edit next to the Connection type field. The Properties for connection types window opens:
The window displays existing connection types and their settings.
Click the new connection type button. A new connection type appears in the list:
Now you can specify the settings for the new connection type:
Setting Description Confirm SQL execution Displays a confirmation dialog for any non-SELECT SQL operations. Confirm data changes Displays a confirmation dialog before persisting changes in the database. Auto-commit by default Sets SQL operations to commit automatically, making it the default transactional mode. Smart commit mode Initiates a transaction before any data modifying queries (e.g., INSERT
,UPDATE
), allowing configuration of additional keywords for transaction activation.Return to auto-commit on transaction end Switches back to auto-commit mode after the transaction is completed (explicit commit or rollback), only active with Smart commit mode. Automatically end long idle transactions (seconds) Closes transactions after a specified idle period with no user activity, performing a rollback before transaction ends. Close idle connection after (seconds) Closes connections with no activity after a specified number of seconds. A value of zero and unchecking this option allows the connections with the current type to remain active indefinitely. Tip: For embedded databases, the setting Close idle connection after (seconds) is always ignored. This means they will never automatically disconnect, regardless of the configured value.
- Click Apply to apply the changes and keep the window open or click Apply and Close to apply the changes and close the window. To discard all changes and return to the previous state, click Restore Defaults.
Edit Connection Type
To edit a connection type:
- In the connection properties window (F4 on a connection), on the General page, click Edit next to the Connection type field.
- Specify the settings for the new connection type the same way as when you create a connection type, see 'Create Connection Types' section above.
- When you finish editing the connection types, click Apply to apply the changes and keep the window open or click Apply and Close to apply the changes and close the window. To discard all changes and return to the previous state, click Restore Defaults.
Delete Connection Type
To delete a connection type:
- In the connection properties window (F4 on a connection), on the General page, click Edit next to the Connection type field. The Properties for connection types window opens.
- In the Properties window, in the list of connection types, click the connection type to set the focus on it and then click the delete button under the list:
- Click Yes in the confirmation dialog box to confirm the deletion. Otherwise, click No.
- Click Apply to apply the changes and keep the window open or click Apply and Close to apply the changes and close the window.