---
title: Manage connections for Lakehouse Federation
description: Learn how to manage Databricks Lakehouse Federation connections, including listing, managing permissions, and dropping them.
canonical_url: https://docs.databricks.com/aws/en/query-federation/connections
---

# Manage connections for Lakehouse Federation

This article describes how to list all Lakehouse Federation connections defined in a Unity Catalog metastore, get connection details, grant connection permissions, and drop connections using Catalog Explorer and SQL statements in notebooks or the Databricks SQL query editor. A *connection* is a securable object in Unity Catalog that specifies a path and credentials for accessing an external database system.

See also [Create a connection](https://docs.databricks.com/aws/en/query-federation/database-federation.md#connection).

If you prefer to use the REST API, see [Databricks reference documentation](https://docs.databricks.com/aws/en/reference/api.md).

## List connections

**Permissions required**: The list of connections returned depends on your role and permissions. Users with the `USE CONNECTION` privilege on the metastore see all connections. Otherwise, you can view only the connections for which you are the connection object owner or have some privilege on.

### Catalog Explorer

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.
2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **Connections** from the menu.

   The connections you have permission to see are listed, along with the URL, create date, owner, and comment.

### SQL

Run the following command in a notebook or the Databricks SQL query editor. Optionally, replace `<pattern>` with a [`LIKE` predicate](https://docs.databricks.com/aws/en/sql/language-manual/functions/like.md).

```sql
SHOW CONNECTIONS [LIKE <pattern>];
```

## Get connection details

**Permissions required**: Connection owner, `USE CONNECTION` privilege on the metastore, or some privilege on the connection.

### Catalog Explorer

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **Connections** from the menu.

3. Find the connection and select it to view details.

### SQL

Run the following command in a notebook or the Databricks SQL query editor.

```sql
DESCRIBE CONNECTION <connection-name>;
```

## <a id="grant-and-revoke-permissions-on-connections" />Grant and revoke permissions on connections

You can grant permission to use a connection to create foreign catalogs or to view details about a connection:

* `CREATE FOREIGN CATALOG` grants the ability to create a foreign catalog as a read-only mirror of a database in the data source described by the connection.
* `USE CONNECTION` grants the ability to use the connection in Lakeflow pipelines to ingest data from the data source into Databricks. However, if granted at the metastore level, it only allows viewing the details of connections in the metastore. Users must still be granted `USE CONNECTION` on individual connections to use them.

**Permissions required**: Metastore admin or connection owner.

### Catalog Explorer

To grant permission to use a connection:

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **Connections** from the menu.

3. Find the connection and select it.

4. On the **Permissions** tab, click **Grant**.

5. On the **Grant on `<connection-name>`** dialog, start typing the user or group name or click the user menu to browse and select users and groups.

6. Select the privileges you want to grant.

   See the privilege descriptions in the section introduction.

7. Click **Grant**.

To revoke a connection privilege:

1. Follow the preceding steps to get to the **Permissions** tab for the connection.
2. Select the user or group whose privilege you want to revoke.
3. Click **Revoke** both on the tab and on the confirmation dialog.

### SQL

To grant the ability to create a foreign catalog using a connection, run the following command in a notebook or the Databricks SQL query editor.

```sql
GRANT CREATE FOREIGN CATALOG ON CONNECTION <connection-name> TO <user-name>;
```

To grant the ability to view the connection, run the following:

```sql
GRANT USE CONNECTION ON CONNECTION <connection-name> TO <user-name>;
```

To revoke a privilege, run the following, where `<privilege>` is one of the privileges on the connection granted to the user:

```sql
REVOKE <privilege> ON CONNECTION <connection-name> FROM <user-name>;
```

## Drop connections

**Permissions required**: Connection owner

### Catalog Explorer

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **Connections** from the menu.

3. Find the connection and select it.

4. Click the ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) kebab menu and select **Delete**.

5. On the confirmation dialog, click **Delete**.

### SQL

Run the following command in a notebook or the Databricks SQL query editor.

```sql
DROP CONNECTION [IF EXISTS] <connection-name>;
```
