AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/servicecontrol/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

ServiceControl Storage

ServiceControl Error and Audit instances store the messages they ingest so that ServicePulse can display and search them. Storage is selected per instance; a Monitoring instance does not need a database.

Storage providers

Choose a provider for each instance. Follow the linked configuration guide to prepare its storage and configure ServiceControl.

Each Error and Audit instance uses one storage provider, selected with the required StorageType setting when the instance is created. There is no default. Instances can use different providers; for example, an Error instance can use SQL Server while its Audit instances use RavenDB.

SQL Server and PostgreSQL storage, and the StorageType setting, are available from ServiceControl 7. Earlier versions support only RavenDB, which is their default.

  • RavenDB needs no separate database server when deploying with PowerShell or the ServiceControl Management Utility, which embed it. It suits teams that do not already run SQL Server or PostgreSQL.
  • SQL Server and PostgreSQL suit teams that already run, monitor, and back up one of these database servers and want ServiceControl data managed with the same tools.

Before choosing SQL Server or PostgreSQL, check how they differ from RavenDB:

  • Error instances also require an external message body store. Audit instances use one for large and binary bodies.
  • SQL Server must have Full-Text Search installed.

To move existing RavenDB instances to SQL storage, see Migrating from RavenDB to SQL storage.

ProviderStorageType valueRequirementsConfiguration
RavenDBRavenDBNone for embedded deployments; a RavenDB container for container deploymentsConfigure RavenDB storage
SQL ServerSQLServerAn existing database on a server with Full-Text Search; an external message body store (required for Error instances)Configure SQL Server storage
PostgreSQLPostgreSQLAn existing database; an external message body store (required for Error instances)Configure PostgreSQL storage

Configure SQL storage separately for each Error instance and Audit instance.

Sharing a database

Keep Error and Audit data apart, either in separate databases or in separate schemas of one database. Separation keeps each instance's permissions apart, and separate databases also let each instance's data be backed up, restored, and sized independently.

  • Separate databases: each database can have its own storage and server. Audit data is usually much larger than Error data and is often less critical to recover, so this is the more flexible choice for production.
  • Separate schemas in one database: simpler to provision, and permissions can still be scoped to each schema. SQL Server backs up and restores whole databases, not schemas, so restoring returns both instances' data to the same point in time. PostgreSQL pg_dump and pg_restore can select one schema with -n, but point-in-time recovery still restores the whole server.

An Error instance and an Audit instance can use the same SQL Server or PostgreSQL database, but each needs its own schema. The default settings already do this: the Error instance uses the connection's default schema, and the Audit instance uses sc_audit. Setup fails if an Error instance and an Audit instance are configured to use the same schema.

The schema rule applies to independent instances. Ingestion-only workers for an Error instance use that Error instance's schema and must not be given a schema of their own. Several Audit instances can also share one database and schema to scale out audit ingestion. Keep configuration consistent across processes that share a database and schema; the linked scale-out guides explain which settings can differ.

External message body storage

SQL-backed Error instances also require an external message body store and do not start without one. SQL-backed Audit instances start without one, but then do not store large or binary bodies. Small text bodies are stored in the database; larger bodies and all binary bodies use the selected external store. See what is stored where. Each instance needs its own directory, container, or key prefix, except processes that share a database; see sharing a message body store.

External body storageUse whenConfiguration
File systemA durable directory or mounted volume is available to the instanceConfigure file system storage
Azure Blob StorageMessage bodies should be stored in an Azure Storage accountConfigure Azure Blob Storage
Amazon S3Message bodies should be stored in an S3 bucketConfigure Amazon S3 storage

See the external message body storage overview for shared configuration and retention guidance.

Backup and restore

Back up and monitor each instance's database and, for SQL-backed instances, its external message body store. Use the database and body-store providers' backup and availability guidance; the RavenDB backup procedure does not apply to SQL storage.

Changing the storage provider

To move an existing RavenDB instance to SQL Server or PostgreSQL, see Migrating from RavenDB to SQL storage.

Related Articles