Database Replication & Failover
Replication copies a database's data and metadata to a target account, potentially in a different region or even a different cloud provider, keeping it in sync on a schedule. Failover promotes a replica to primary during an outage; failback reverses that once the original recovers.
ACCOUNT A · AWS EU-WEST-1
ACCOUNT B · AZURE WEST EUROPE
NORMAL DAY · REPLICATION · ALL EDITIONS
PRIMARYprod_dbread-write · apps write here
SECONDARYprod_dbread-only replica
scheduled REFRESH
copies changed data
billed to account B
REGION OUTAGE · FAILOVER · BUSINESS CRITICAL+
✗PRIMARY · REGION DOWNprod_dbunreachable
RUN ON BALTER … PRIMARY
✓NEW PRIMARYprod_dbpromoted: now read-write
Recovery point: changes made after the last refresh are lost.
Client Redirect (Business Critical+) points the apps' connection URL at account B.
Two boundaries keep this honest. Replication targets are accounts in the same organization, and what replicates is the database's contents, not the account around it: shares go into a replication group, on any edition, while users, roles and warehouses need a replication or failover group on Business Critical, or their own setup on the target side. The distinction that matters is edition: replicating for read access is broadly available, but promoting a secondary (failover) and returning (failback) require Business Critical.
A replication group is a set of objects replicated and refreshed together; on any edition it can hold databases and shares. A failover group is a replication group that can also be promoted to primary. Putting users, roles or warehouses in a group needs Business Critical. Snowflake recommends groups over database-level replication; the example below shows both. Failover and failback, where an administrator promotes a secondary to primary (Snowflake doesn't fail over by itself), require Business Critical edition or above.
-- Recommended: a failover group (Business Critical)-- Source accountCREATE FAILOVER GROUP prod_fgOBJECT_TYPES = DATABASES, ROLES, USERS, WAREHOUSESALLOWED_DATABASES = prod_db ALLOWED_ACCOUNTS = myorg. eu_ account REPLICATION_SCHEDULE = '10 MINUTE'; -- Target accountCREATE FAILOVER GROUP prod_fg AS REPLICA OF myorg.us_ account. prod_ fg; ALTER FAILOVER GROUP prod_fg REFRESH;ALTER FAILOVER GROUP prod_fg PRIMARY; -- during an outage-- Simple case: one databaseALTER DATABASE prod_db ENABLE REPLICATION TO ACCOUNTS myorg.eu_ account; -- source ALTER DATABASE prod_db ENABLE FAILOVER TO ACCOUNTS myorg.eu_ account; -- source, Business Critical CREATE DATABASE prod_db AS REPLICA OF myorg.us_ account. prod_ db; -- target ALTER DATABASE prod_db REFRESH;ALTER DATABASE prod_db PRIMARY; -- during an outage
A secondary (replica) database is read-only until promoted; applications keep writing to the primary. Refreshes aren't continuous streaming, they're triggered, either manually or on a schedule, so replicas trail the primary by however long since the last refresh, an RPO (recovery point objective) consideration worth flagging in any disaster recovery design.
- Time Travel: self-service, 0–1 day Standard, 0–90 days Enterprise+, controlled by DATA_RETENTION_TIME_IN_DAYS with an account-level floor.
- Fail-safe: fixed 7 days, Support-only, permanent tables exclusively.
- Cloning: instant, metadata-only, storage-cheap until modified; grants on the cloned container itself don't carry over, grants on its child objects do.
- Replication: broadly available. Failover/failback: Business Critical+.

