---
url: >-
  /flow/guide/administering-flow/configuring-flow/data-connections/db-connections.md
---

# DB Connections

DB Connections provide a pointer to a database. You configure the DB Connection with the appropriate details for connecting to the database.

By being a separate module from the DB Definition it allows you to create a single DB Definition and use it against multiple similar databases in different locations simply by assigning a different DB Connection.

When assigning a DB Connection to a DB Definition it is considered a design time assignment, when coming to use the DB Definition in an Action you have the chance to reassign the DB Connection. This allows you to use the same DB Definition in multiple Actions each with their own DB Connection. This is run time assignment.

A DB Connection is similar to a System Connection (see [System Connections](/flow/guide/getting-started/configuration-databases/system-connections)), but serves a different purpose:

* A System Connection refers to (the whole of) a Flow configuration database, for use with Flow Designer.
* A DB Connection is a Flow component held within a configuration database, and typically refers to a separate, non-Flow application database (e.g. CRM, or Accounting).

::: details Create a DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)

2. Navigate to `Configuration > Components > Data Connections > DB Connections`

3. Right click `DB Connections` and select `New`

   ![](/flow/images/db-connection-general-.jpg)

4. Fill in the details and click `Save`. See [DB Connection](/flow/guide/administering-flow/configuring-flow/data-connections/db-connections/db-connection/)
   :::

:::: details Edit a DB Connection
::: tip
A single left click on the DB Connection will also open the edit window
:::

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)
2. Navigate to `Configuration > Components > Data Connections > DB Connections`
3. Right click the desired `DB Connection` and select `Edit`
4. Change the details as required and click `Save`. See [DB Connection](/flow/guide/administering-flow/configuring-flow/data-connections/db-connections/db-connection/)
   ::::

::: details Delete a DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)

2. Navigate to `Configuration > Components > Data Connections > DB Connections`

3. Right click the desired `DB Connection` and select `Delete`

   ![](/flow/images/delete-db-connection.jpg)

4. Click `Yes` to confirm your choice
   :::

::: details Copy a DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)
2. Navigate to `Configuration > Components > Data Connections > DB Connections`
3. Right click the desired `DB Connection` and select `Copy`
4. The copy of the DB Connection will display in the edit window. Change the details as required and click `Save`. See [DB Connection](/flow/guide/administering-flow/configuring-flow/data-connections/db-connections/db-connection/)
   :::

::: details Export a DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)

2. Navigate to `Configuration > Components > Data Connections > DB Connections`

3. Right click the desired `DB Connection` and select `Export`

   ![](/flow/images/export-save-template-file.jpg)

4. The template file will be assigned a default file name consisting of the name and type of the module. Change the name if desired and click `Save`. See [Exporting and Importing](/flow/guide/administering-flow/configuring-flow/exporting-and-importing/)
   :::

::: details Import a DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)

2. Navigate to `Configuration > Components > Data Connections > DB Connections`

3. Right click `DB Connections` and select `Import`

   ![](/flow/images/import-template-file.jpg)

4. Select the Template file you wish to import and click `Open`

   ![](/flow/images/template-import-settings.jpg)

5. Choose the import method and click `OK`. See [Exporting and Importing](/flow/guide/administering-flow/configuring-flow/exporting-and-importing/) A confirmation screen will show what has been imported.

   ![](/flow/images/import-confirmation.jpg)
   :::

::: details Change Security on DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)
2. Navigate to `Configuration > Components > Data Connections > DB Connections`
3. Right click the desired `DB Connection` and select `Security`
4. Change the details as required and click `Save`. See [Managing Security](/flow/guide/using-flow/managing-users-and-security/managing-security)
   :::

::: details Refresh list of DB Connections

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)
2. Navigate to `Configuration > Components > Data Connections > DB Connections`
3. Right click `DB Connections` and select `Refresh`
   :::

::: details Execute bespoke SQL against DB Connection

1. Open the [Flow Designer](/flow/guide/getting-started/starting-flow)
2. Navigate to `Configuration > Components > Data Connections > DB Connections`
3. Right click the desired `DB Connection` and select `Open SQL Window`. The SQL Window will open defaulted to this DB Connection. See [SQL Window](/flow/guide/administering-flow/configuring-flow/global-setup/sql-window/)
   :::
