Keep calm and use Connection types

In our previous article, we talked about transactions and how they work in DBeaver. When you are in the development and testing phase of your project, there is usually no need to keep track of transactions. But if we are talking about a production system, we need stricter control over reading and editing data. Therefore, DBeaver has Connection types that allow you to track transactions only when you need to.

DBeaver Connection Types

By default, DBeaver offers you a choice of three Connection types:

  • Development;
  • Test;
  • Production.

Each of these types has its own properties. For example, for the Production type, confirmation of the SQL script execution, confirmation of data changes, and automatic ending of long idle transactions applied.

For each new connection, the Development type is predefined. To change this setting you need to right-click on the connection and go to Edit connection -> General.

Once you choose a connection type, it will be highlighted in the specified color in your Navigation tree, Data editor, and SQL editor. This protects you from the risk of accidentally making changes to the production system.

If you click on the Edit connection types button, the settings window will open and you will see the default properties for each Connection type.

In cases where these property sets are not enough, you can customize each Connection type for yourself. By clicking on the Set permissions button, you can restrict yourself from editing data or metadata, executing scripts, or importing data. Please note that these restrictions will not affect the database itself and the process of working with it by other users.

You can also change the name, description or background color for any of the Connection types.

If in your project Autocommit mode is not safe enough even for the Development connection type,
you can set Smart commit mode for it.

In rare cases of complex infrastructure, when you have more than three development stages, you may need to create your own Connection types. To add a new type and remove unnecessary options, use the two buttons below the window with the list of connection types. To avoid mixing up custom types with each other, set a name, description and background color for each of them.

Now when creating a new connection, you can choose one of the pre-configured types. Using this feature has already saved many hours of work for our users. Therefore, we highly recommend that you try it out and evaluate its convenience yourself.