---
title: "corestack_external_db_disable"
url: https://docs.corefinity.com/mcp/tools/corestack_external_db_disable
type: tool
last_updated: 2026-11-13
feature: database
related:
  - https://docs.corefinity.com/api/reference/database/disable-site-external-database.md
  - https://docs.corefinity.com/guides/sites/database/database-users.md
---
# corestack_external_db_disable

**Turn off external database access.** Turn off external database access for an environment: its external users are removed, the charge stops, and the address is released (a later turn-on gives a new address under the same host name). Type the environment's name as confirm_environment. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Confirmation: `confirm_environment`
- Runs as a task: yes

## When to use it

Turn off external database access for an environment. Its external users are removed at once, so nobody can sign in from outside from that moment; the monthly charge stops from now; then the public endpoint, the host name's record and the fixed address go. Internal users keep working.

The address cannot be got back: turning access on again later gives a new address under the same host name, and every outside system must then connect to it. Ask the person to type the environment's name, and send it as `confirm_environment` (as the site shows it, for example `Production`). Turning it off needs the site's billing rights.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `confirm_environment` (string, 1–191 characters, required): The environment's name, typed, e.g. Production.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_environment": {
      "description": "The environment's name, typed, e.g. Production.",
      "maxLength": 191,
      "minLength": 1,
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "confirm_environment"
  ],
  "type": "object"
}
```

## Refusals

- `confirm_mismatch`: `confirm_environment` is not the environment's name; nothing changed.
- `billing_forbidden`: the person cannot change this site's billing; the site's owner turns it off.
- `external_db_already_off`: external access is off already (or turning off).
- `external_db_failed`: the last change to external access failed; Corefinity support retries or releases it.
- `busy`: another change to this environment is applying.
- `deleted`: the site is deleted (in its grace period).
- `provisioning`: the site is still being created.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_external_db_disable",
  "arguments": {
    "site_id": 4211,
    "confirm_environment": "Production"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_external_db_disable with site_id 4211. (Turn off external database access.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/external-db/disable](https://docs.corefinity.com/api/reference/database/disable-site-external-database.md)
- Guide: [Database users](https://docs.corefinity.com/guides/sites/database/database-users.md)
