# Create a database connection

This article helps you to create a database connection.

This is a one-time action performed during the initial creation and can be reused later.

### Prerequisites

Before you set up Planning sheets, make sure you have the following prerequisites in place:

* Data in a [Fabric SQL database](https://learn.microsoft.com/en-us/fabric/database/sql/overview)

### Create a database connection

1. In your Fabric toolbar, select the **Settings** icon. Select **Manage connections and gateways**

![](/files/kAzGiqO1c3H2hKZjl4FJ)<br>

2. Select **New**.
3. Select **Cloud**.
4. Enter a **Database Connection name**.
5. For **Connection type**, select *SQL database in Fabric*.
6. Set the **Authentication method** to *OAuth 2.0*.
7. Select **Edit credentials**, then sign in with your Microsoft account.
8. Select **Create** to create the connection.

### Share the database connection <a href="#share-the-database-connection" id="share-the-database-connection"></a>

You can share the created connection and manage the user permissions. Click **Manage users**.

1. Next to the name of the connection in your Fabric workspace, select **...** and **Manage users**.

<figure><img src="/files/j37mFdlvGkA6rUbFHKw3" alt=""><figcaption></figcaption></figure>

2. Edit the permissions and share as needed.

<figure><img src="/files/dNAdjnYKZUCpx3ySwGqO" alt=""><figcaption></figcaption></figure>

Now that your database connection is created, you can create a Planning sheet that uses this connection: [Create a Planning sheet](/planning-sheets/how-tos/creating-a-planning-sheet.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/how-tos/create-a-database-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
