# MD_CURRENT_CLIENT_CONNECTION_ID and MD_CURRENT_CLIENT_DUCKDB_ID
> Retrieve connection identifiers and DuckDB instance IDs for debugging and monitoring.
:::info
This is a preview feature. Preview features may be operationally incomplete and may offer limited backward compatibility.
:::

# MD_CURRENT_CLIENT_CONNECTION_ID and MD_CURRENT_CLIENT_DUCKDB_ID

`md_current_client_connection_id` and `md_current_client_duckdb_id` are two scalar functions that can be used to identify the current `client_connection_id` and `client_duckdb_id`.

## Syntax

```sql
SELECT md_current_client_connection_id();
SELECT md_current_client_duckdb_id();
```

## Example usage
To [interrupt](documentation/sql-reference/motherduck-sql-reference/connection-management/interrupt-connections.md) all server-side connections that are initiated by the current client DuckDB instance, we can use:

```sql
SELECT md_interrupt_server_connection(client_connection_id)
FROM md_active_server_connections()
WHERE client_duckdb_id = md_current_client_duckdb_id()
  AND client_connection_id != md_current_client_connection_id();
```


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Fmotherduck-sql-reference%2Fconnection-management%2Fconnection-duckdb-id%2F&page_title=MD_CURRENT_CLIENT_CONNECTION_ID%20and%20MD_CURRENT_CLIENT_DUCKDB_ID&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
