Skip to main content

Connection Strings Overview

  • 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 - available only to one database.
    • Server-wide - defined once at the cluster level and propagated automatically to databases in the cluster.

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

RavenDB supports the following connection string types:

TypeConnects toUsed by
RavenDBAnother RavenDB databaseRavenDB ETL, External Replication,
and Hub/Sink Replication
SQLA relational databaseSQL ETL and CDC Sink
SnowflakeA Snowflake warehouseSnowflake ETL
OLAPLocal or cloud storageOLAP ETL
ElasticsearchAn Elasticsearch clusterElasticsearch ETL
QueueA supported queue broker or queue serviceQueue ETL and Queue Sink tasks
AIAI providers or RavenDB's embedded modelEmbeddings generation, GenAI tasks,
and AI Agents

Scope: per-database and server-wide

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

ScopeUse whenAvailability
Per-databaseOne database needs its own connection details,
or different databases need different credentials, endpoints, or providers.
Stored in one database record and available only to tasks in that database.
Server-wideMany 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

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

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