---
title: "Connection Strings Overview"
description: "Connection strings store reusable connection details for RavenDB tasks that connect to external systems. They can be defined per database or server-wide."
url: "https://docs.ravendb.net/7.2/integrations/connection-strings/overview"
version: "7.2"
---

# Connection Strings Overview

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - A **connection string** is a named, reusable object that stores the details RavenDB needs to connect to an external system or another RavenDB database,
>   such as destination URLs, the target database or resource, and authentication parameters.
>
> - RavenDB tasks and features reference a connection string by name.  
>   This keeps connection details outside each task or feature definition and lets the same connection string be reused.
>
> - Connection strings can be defined in one of two scopes:
>   - [Per-database](https://docs.ravendb.net/7.2/integrations/connection-strings/per-database/overview.md) - available only to one database.
>   - [Server-wide](https://docs.ravendb.net/7.2/integrations/connection-strings/server-wide/overview.md) - defined once at the cluster level and propagated automatically to databases in the cluster.
>
> ---
>
> - In this article:
>   - [What connection strings are used for](#what-connection-strings-are-used-for)
>   - [Supported connection string types](#supported-connection-string-types)
>   - [Scope: per-database and server-wide](#scope-per-database-and-server-wide)
>   - [Managing connection strings](#managing-connection-strings)

## What connection strings are used for {#what-connection-strings-are-used-for}

Connection strings define the connection details that RavenDB tasks and features use to connect to another system:

- **ETL tasks**:  
  Send transformed data from RavenDB to another RavenDB database, a relational database, cloud storage, a search engine, or a queue provider.
- **External Replication**:  
  Replicate documents to another RavenDB database.
- **Queue Sink tasks**:  
  Consume messages from a message broker and store the resulting documents in RavenDB.
- **CDC Sink tasks**:  
  Stream changes from an external CDC database and store the resulting documents in RavenDB.
- **AI features**:  
  Connect to AI providers used by embeddings generation, GenAI tasks, and AI Agents.

## Supported connection string types {#supported-connection-string-types}

RavenDB supports the following connection string types:

| Type | Connects to | Used by |
| - | - | - |
| **RavenDB** | Another RavenDB database | [RavenDB ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/raven.md), [External Replication](https://docs.ravendb.net/7.2/server/ongoing-tasks/external-replication.md),<br />and [Hub/Sink Replication](https://docs.ravendb.net/7.2/server/ongoing-tasks/hub-sink-replication.md) |
| **SQL** | A relational database | [SQL ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/sql.md) and [CDC Sink](https://docs.ravendb.net/7.2/server/ongoing-tasks/cdc-sink/overview.md) |
| **Snowflake** | A Snowflake warehouse | [Snowflake ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/snowflake.md) |
| **OLAP** | Local or cloud storage | [OLAP ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/olap.md) |
| **Elasticsearch** | An Elasticsearch cluster | [Elasticsearch ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/elasticsearch.md) |
| **Queue** | A supported queue broker or queue service | [Queue ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/queue-etl/overview.md) and [Queue Sink](https://docs.ravendb.net/7.2/server/ongoing-tasks/queue-sink/overview.md) tasks |
| **AI** | AI providers or RavenDB's embedded model | [Embeddings generation](https://docs.ravendb.net/7.2/ai-integration/generating-embeddings/overview.md), [GenAI tasks](https://docs.ravendb.net/7.2/ai-integration/gen-ai-integration/overview.md),<br />and [AI Agents](https://docs.ravendb.net/7.2/ai-integration/ai-agents/overview.md) |

## Scope: per-database and server-wide {#scope-per-database-and-server-wide}

A connection string can be defined at one of two scopes:

| Scope | Use when | Availability |
| - | - | - |
| **[Per-database](https://docs.ravendb.net/7.2/integrations/connection-strings/per-database/overview.md)** | One database needs its own connection details,<br />or different databases need different credentials, endpoints, or providers. | Stored in one database record and available only to tasks in that database. |
| **[Server-wide](https://docs.ravendb.net/7.2/integrations/connection-strings/server-wide/overview.md)** | Many databases share the same connection details, and you want one place to update endpoints, credentials, or provider settings. | Stored at the cluster level and propagated to all databases, except databases that are explicitly excluded. |

## Managing connection strings {#managing-connection-strings}

Connection strings can be created, updated, read, and removed from Studio or through the Client API.

- **Per-database connection strings**  
  Manage them from the database's **Settings > Connection Strings** view in Studio, or via the Client API.  
  Learn more in:
  - [Add or update a per-database connection string](https://docs.ravendb.net/7.2/integrations/connection-strings/per-database/add-or-update-connection-string.md)
  - [Get per-database connection strings](https://docs.ravendb.net/7.2/integrations/connection-strings/per-database/get-connection-strings.md)
  - [Remove a per-database connection string](https://docs.ravendb.net/7.2/integrations/connection-strings/per-database/remove-connection-string.md)

- **Server-wide connection strings**  
  Manage them from **Manage Server > Server-Wide Connection Strings** in Studio, or via the Client API.  
  Learn more in:
  - [Add or update a server-wide connection string](https://docs.ravendb.net/7.2/integrations/connection-strings/server-wide/add-or-update-connection-string.md)
  - [Get server-wide connection strings](https://docs.ravendb.net/7.2/integrations/connection-strings/server-wide/get-connection-strings.md)
  - [Remove a server-wide connection string](https://docs.ravendb.net/7.2/integrations/connection-strings/server-wide/remove-connection-string.md)

A connection string cannot be deleted while it is still referenced by a task.
