Skip to content

Setting up dbvr with DBeaver

If you already use DBeaver, use it to configure connections and projects, and run them with dbvr. Both tools share the same workspace, so everything you create in DBeaver is immediately available in dbvr - no extra setup.

Use this setup when you manage connections in a GUI, but run automation through CLI - for scripts, pipelines, or scheduled jobs.

How it works

dbvr and DBeaver read from the same DBeaverData directory. If both point to the same location, they share all configuration automatically.

What is shared

Shared Description Configure in DBeaver Configure in dbvr
Workspace Both tools read from the same DBeaverData directory Workspace location Workspace location
Connections All connections from data-sources.json are available in both tools Create connection datasource
Projects Projects are shared between tools Projects project
Drivers Reuse the same driver binaries Manage drivers Driver management
Network settings SSH tunnels, proxies, and other network handlers work the same way Network profiles network handlers

Tip

If DBeaver uses a different workspace, point dbvr to it with the -data flag. Learn more

Workflow: create in DBeaver, run with dbvr

  1. Open DBeaver and create a connection.

    Info

    For step-by-step instructions, see Create connection.

  2. Test the connection in DBeaver to confirm it works.

  3. Confirm the connection is available in dbvr and get its datasource ID:

    dbvr datasource list
    

    Alternatively:

    • Open the data-sources.json - the datasource ID is the top-level key
    • In DBeaver: Edit connection -> Connection settings -> Internal parameters -> Connection ID
  4. Use the connection in dbvr by datasource ID or name:

    dbvr sql --datasource=my-postgres-db -in=./path/to/your.sql
    

    Info

    For information on running SQL with dbvr, see sql.

The connection is immediately available in dbvr - no additional setup.