> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SHOW EXTERNAL CONNECTION

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. `SHOW EXTERNAL CONNECTION` displays the connection name, URI, and the type of connection.

You can also use the following SQL statements to work with external connections:

* <InternalLink path="create-external-connection">`CREATE EXTERNAL CONNECTION`</InternalLink>
* <InternalLink path="show-create-external-connection">`SHOW CREATE EXTERNAL CONNECTION`</InternalLink>
* <InternalLink path="drop-external-connection">`DROP EXTERNAL CONNECTION`</InternalLink>

## Required privileges

Users with the <InternalLink path="security-reference/authorization#admin-role">`admin` role</InternalLink> can view all external connections with `SHOW EXTERNAL CONNECTION`.

Without the `admin` role, users can view the external connections that they own. Users own external connections that they have created with `CREATE EXTERNAL CONNECTION`.

## Synopsis

<img src="https://mintcdn.com/cockroachlabs/tGEtnfk6iFpQGcmj/images/sql-diagrams/v26.1/show_external_connections.svg?fit=max&auto=format&n=tGEtnfk6iFpQGcmj&q=85&s=06999b904ab5be4f5e57aaed4367d5fd" alt="show_external_connections syntax diagram" style={{maxWidth: "100%", overflowX: "auto"}} width="583" height="81" data-path="images/sql-diagrams/v26.1/show_external_connections.svg" />

### Parameters

`string_or_placeholder` is the name of the created external connection.

## Responses

| Response           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `connection\_name` | The user-specified name of the external connection.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `connection\_uri`  | The <InternalLink path="create-external-connection#supported-external-storage-and-sinks">storage/sink</InternalLink> URI that the external connection references.                                                                                                                                                                                                                                                                                                                                                                                            |
| `connection_type`  | Possible values are: <br /><ul><li>`STORAGE` applies to <InternalLink path="use-cloud-storage">storage for backups and imports</InternalLink> and <InternalLink path="changefeed-sinks">changefeed sinks</InternalLink>.</li><li>`KMS` applies to <InternalLink path="take-and-restore-encrypted-backups">storage for encrypted backups</InternalLink>.</li><li>`FOREIGNDATA` applies to <InternalLink path="set-up-physical-cluster-replication#connection-reference">`postgres://` connections for physical cluster replication</InternalLink>.</li></ul>. |

## Examples

### Show all external connections in the cluster

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
SHOW EXTERNAL CONNECTIONS;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  connection_name |                                                                                                                                    connection_uri                                                                                                                                     | connection_type
------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------
  msk             | kafka://boot-vzq1qitx.c1.kafka-serverless.us-east-1.amazonaws.com:9098/?sasl_aws_iam_role_arn={ARN}&sasl_aws_iam_session_name={session name}t&sasl_aws_region=us-east-1&sasl_enabled=true&sasl_mechanism=AWS_MSK_IAM&tls_enabled=true                                                 | STORAGE
  s3_bucket       | s3://bucket name?AWS_ACCESS_KEY_ID={access key}&AWS_SECRET_ACCESS_KEY=redacted                                                                                                                                                                                                        | STORAGE
```

### Show an external connection

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
SHOW EXTERNAL CONNECTION s3_bucket;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  connection_name |                                       connection_uri                                       | connection_type
------------------+--------------------------------------------------------------------------------------------+------------------
  s3_bucket       | s3://bucket name?AWS_ACCESS_KEY_ID={access key}&AWS_SECRET_ACCESS_KEY=redacted             | STORAGE
(1 row)
```

## See also

* <InternalLink path="changefeed-sinks">Changefeed Sinks</InternalLink>
* <InternalLink path="use-cloud-storage">Use Cloud Storage</InternalLink>
