> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/integrations/disable.md).

# Disable or delete an integration

Disable a database integration, enable it again, or delete it.

**Where:** Database → Integrations → *integration* → **Actions** → **Disable** / **Delete** · `/projects/<project>/db/integrations/<integrationId>/edit`

## Before you start

* You need `database:update` on the integration to disable it, `database:delete` to delete it.
* Deleting cannot be undone: the collections in that database are no longer reachable from Norbix. A managed Flex database of this environment is removed with it.

## Steps

1. Open **Database → Integrations** and click the integration.
2. To pause it, open **Actions** and choose **Disable**. The badge becomes **DISABLED** and the list shows **Enabled** `False`. **Actions** → **Enable** turns it on again.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-9c0079786cbbe443b7b7434ad6674aea0be038a7%2Fdisable-1.png?alt=media" alt="Database Integrations list: Reporting replica with Enabled False, Primary Database with Enabled True and DEFAULT"><figcaption><p>A disabled integration in the list.</p></figcaption></figure>
3. To remove it, open **Actions** and choose **Delete**. The dialog **Delete Confirmation** asks *Are you sure you want to delete?*; press **Delete**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-d25ba0d8672eae79ada2b393e196f798ea64c993%2Fdisable-2.png?alt=media" alt="Editing MongoDB integration with the badges DISABLED and TESTED behind the dialog Delete Confirmation: Are you sure you want to delete?"><figcaption><p>Deleting an integration that is not the default.</p></figcaption></figure>

   For the **default** integration the dialog is **Delete default database integration**: it lists what other modules store in that database (for example **Membership — users**), and **Delete** turns on only after you paste the integration id into the field.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-f4f4f7c427883dcfdaf7da18006d16fd9f5fe913%2Fdisable-4.png?alt=media" alt="Dialog Delete default database integration: Other modules depend on this database, Membership — users; the integration id int_16tRKvLqwNnK1sPWkSkNUV to copy and a field Paste the integration id here; Cancel and a disabled Delete"><figcaption><p>Deleting the default integration asks for its id.</p></figcaption></figure>

## Result

After **Delete**, the integration is gone from the list. Delete and disable act on the copy of the environment you are working in only.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-05012cb0ebe9eff9e793ed7702e8082dd95f2161%2Fdisable-3.png?alt=media" alt="Database Integrations list with only Primary Database (DEFAULT) left"><figcaption><p>The list after the delete.</p></figcaption></figure>

## Change or remove it later

* A disabled integration keeps its settings: **Actions** → **Enable** turns it on again.
* A deleted integration cannot be restored: [connect it again](/codemash/cloud/integrations/providers/mongodb.md) and set it as default if needed.
* A project with a managed Flex database cannot be deleted until the Flex integration is deleted in every environment (`CM-ERRORS-PROJECTS-027`).

## Do it from code

```ts
await norbix.hub.database.disableDatabaseIntegration({ id });
await norbix.hub.database.enableDatabaseIntegration({ id });
await norbix.hub.database.disableDatabaseIntegration({ id });
await norbix.hub.database.deleteDatabaseIntegration({ id });
```

```sh
norbix hub database integration disable --id int_5LEreVpoQyRy9iVrUL5ZlI --yes
```

The client setup is on the [Database page](/codemash/cloud/database.md#use-it-from-code). API: [Disable Database Integration](/codemash/api-reference/database/integrations/disable-database-integration.md) · [Enable Database Integration](/codemash/api-reference/database/integrations/enable-database-integration.md) · [Delete Database Integration](/codemash/api-reference/database/integrations/delete-database-integration.md)
