# Manage database connections in a workspace

## Database connections as workspace resources

This article explains how to manage database connections added to your workspaces. Such data sources can be attached to any notebook residing in the respective workspace.

Procedure: Access database connections in a workspace

1. In the sidebar on the Home page, select the workspace where you want to view database connections.

2. In the workspace resources, select ![Document](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/document.svg)Data and switch to the Databases tab.

!['Databases' tab](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/ws-databases.png)

All further procedures are performed from here.

## Manage database connections as workspace resources

> **Note: Note for Datalore On-Premises users**
> This does not apply to instance wide database connections that were added to the workspace resources when created by an admin. Such database connections can only be managed on the Admin panel. Find more details in [this chapter](instance-wide-data-sources.html).

![Manage databases](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/manage_db.png)

Procedure: Rename a database connection

1. Right-click the connection you want to rename. This will open a popup menu.

2. Select Rename from the popup menu. Now, you can edit the database connection name.

3. Enter the new name and press `Enter` (Windows), `Return` (macOS).

Procedure: Edit database connection details

1. Right-click the connection you want to manage. This will open a popup menu.

2. Select Edit. This will open the Edit database connection dialog.

3. In the Edit database connection dialog, edit the connection details. Find database-specific information in the respective article listed under [Configure a database connection](configure-a-database-connection.html).

4. Click the Save and close button to finish the procedure.

Procedure: Clone a database connection

1. Right-click the connection you want to clone. This will open a popup menu.

2. Select one of the two options:

* Clone to this workspace: to clone the connection to the same workspace. It will be added to the same list under a slightly different name.

* Clone to other workspaces: to clone the connection to other workspaces: 1. In the Clone [database_connection_name] to other workspaces dialog, expand the Workspace list. 2. Select the workspaces you want to clone the connection to. 3. Click the Clone button.

Procedure: Export database connection in XML format

This procedure saves the details of a database connection in XML format with all current values and copies them into your clipboard. You can use the copied XML content to create another database connection.

1. On the Home page, select the workspace to which you want to add a database connection.

2. From the left-hand menu, select Databases to open the list of all workspace database connections.

3. Right-click the connection you want to manage. This will open a popup menu.

4. Select Export to .xml.

The data is copied to your clipboard.

Procedure: Delete a database connection

This procedure deletes database connections from your Datalore system without moving it to Trash.

1. Right-click the connection you want to manage. This will open a popup menu.

2. Select Delete.

Procedure: Find where a database connection is used

For any database connection, you can view all notebooks and SQL cells that use it.

> **Tip:**
> The search includes all notebooks you have access to. Notebooks [shared through a link](share-a-notebook.html#use-links) are included only if you have previously opened them.

To find where a connection is used:

1. On the home page, select the workspace where the database connection is attached.

2. In the expanded list of workspace resources, select ![document icon](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/document.svg) Data.

3. Switch to the Databases tab.

4. Select the connection and switch to the Usages tab.

You will see a list of SQL cells that use this connection. From here, you can open the notebook or SQL cell directly, or copy the cell code.

> **Tip:**
> * To select between displaying all connections with the same credentials or this particular connection, click ![three dots icon](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/dots.svg) (More) and select Single connection or All matching connections.
>
> * To group results by a notebook or query, click ![three dots icon](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/dots.svg) (More) and select the preferred option.
>
> * To search the content of the SQL cells where the connection is used, start typing in the search field. You can exclude a word by using `-`.

Procedure: Run database queries

You can execute queries from the database configuration dialog without opening a notebook. It can help you to validate the connection and permissions, preview data, check data quality or perform diagnostics on a connected database.

You can further explore the query results using the data explorer tool and download the results as `.csv` or `.xlsx` files.

1. On the Home page, select the workspace in the sidebar.

2. In the list of workspace resources, select ![Document](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/document.svg)Data.

3. Switch to the Databases tab.

4. Select a database connection.

5. Switch to the Queries tab.

6. Enter your query and click Execute query.

7. Review the query results in the data explorer section.

For more details, refer to [Use data explorer](data-explorer.html).

## (For Datalore On-Premises only)

As a Datalore On-Premises admin, you can do the following to customize your database connection options:

* Attach custom JDBC drivers to connect to databases that are not natively supported in Datalore

* Create instance-wide database connections shared across all workspaces within your Datalore instance

For more details, refer to [Using custom or third-party JDBC drivers](custom-drivers.html).

## Keywords

database, database connection, attach data, data sources, workspaces, workspace data sources, workspace resources, workspace databases

