Snowflake

Snowflake Database Replication: DR Design Guide

2026-03-26
Updated: 2026-03-27
NicheeLab Editorial Team
Table of contents
  1. Primary / Secondary Architecture
  2. Replication Types
  3. Creating a Failover Group
  4. Failover Procedure
  5. RPO / RTO Design
  6. Client Redirect (Connection Failover)
  7. Replication Monitoring
  8. Edition Requirements Summary
  9. DR Design Best Practices
  10. Check Your Understanding
  11. Frequently Asked Questions

Database Replication is a Snowflake feature that replicates databases to accounts in different regions or cloud providers. Combined with Failover Group, it lets you build a robust architecture for disaster recovery (DR) and business continuity (BCP). Database replication itself is available on all editions, but failover (promoting a secondary), Failover Groups, and Client Redirect require Business Critical Edition or higher.

Primary / Secondary Architecture

Snowflake replication operates on a Primary-Secondary model. The Primary database (or Failover Group) is the writable source of truth, and the Secondary is a read-only replica. The Secondary periodically receives incremental snapshots from the Primary to stay in sync.

┌──────────────────────────────┐     Replication          ┌──────────────────────────────┐
│  Source Account (US-EAST-1)  │ ──────────────────────→ │  Target Account (EU-WEST-1)  │
│                              │   Incremental snapshot   │                              │
│  [Primary]                   │                         │  [Secondary / Read-only]       │
│   ├─ DB: analytics           │                         │   ├─ DB: analytics (replica)   │
│   ├─ DB: raw_data            │                         │   ├─ DB: raw_data (replica)    │
│   ├─ Roles / Users           │                         │   ├─ Roles / Users (replica)   │
│   └─ Network Policies        │                         │   └─ Network Policies (replica)│
└──────────────────────────────┘                         └──────────────────────────────┘
        ↑ Normal ops run on Primary                           ↑ Promote to Primary on DR event

Replication Types

TypeScopeFailoverEdition Requirement
Database ReplicationIndividual databasesBusiness Critical or higher only (manual promotion with ALTER DATABASE ... PRIMARY)Standard or higher
Replication GroupMultiple DBs + sharesNot supportedStandard or higher (Business Critical or higher to include objects other than DBs and shares)
Failover GroupMultiple DBs + roles + warehouses + network policies, etc.Supported (manual promotion with ALTER FAILOVER GROUP ... PRIMARY)Business Critical or higher

Creating a Failover Group

-- Create a Failover Group in the source account
CREATE FAILOVER GROUP prod_dr_group
  OBJECT_TYPES = DATABASES, ROLES, USERS, WAREHOUSES, NETWORK POLICIES, INTEGRATIONS
  ALLOWED_DATABASES = analytics, raw_data
  ALLOWED_INTEGRATION_TYPES = SECURITY INTEGRATIONS
  ALLOWED_ACCOUNTS = myorg.target_account
  REPLICATION_SCHEDULE = '10 MINUTE';

-- Create the Secondary Failover Group in the target account
CREATE FAILOVER GROUP prod_dr_group
  AS REPLICA OF myorg.source_account.prod_dr_group;

-- Manually trigger replication (for testing)
ALTER FAILOVER GROUP prod_dr_group REFRESH;

Failover Procedure

On a DR event, sign in to the target account and promote the Failover Group to Primary with a role that has the FAILOVER privilege. This is a manual operation: Snowflake does not detect an outage and switch over for you. After promotion, the Failover Group on the original source account becomes a read-only Secondary.

-- Promote to Primary on the target account (DR activation, run manually)
ALTER FAILOVER GROUP prod_dr_group PRIMARY;

-- On the original source account (now a Secondary), resume scheduled refreshes
-- (failover suspends scheduled refreshes on secondary failover groups)
ALTER FAILOVER GROUP prod_dr_group RESUME;

-- Failback: re-promote on the original source account
-- (Run this after data written on the target account has replicated back)
ALTER FAILOVER GROUP prod_dr_group PRIMARY;

RPO / RTO Design

MetricDefinitionHow to control in SnowflakeTypical value
RPO (Recovery Point Objective)Maximum acceptable data loss windowREPLICATION_SCHEDULE interval (lag can reach 2x the interval)10 min - 1 hour
RTO (Recovery Time Objective)Maximum acceptable downtime until recoveryTime from deciding to fail over until ALTER FAILOVER GROUP ... PRIMARY is run manuallyMinutes to tens of minutes

RPO is driven by the REPLICATION_SCHEDULE interval, but a secondary can be up to twice the interval behind the primary. With a 10-minute schedule, you may lose up to the last 20 minutes of data in the worst case. With RPO Assurance (GA September 2026), Snowflake manages continuous refreshes instead of a schedule and targets a 30-minute RPO; failover is still a manual step. RTO is the time it takes to decide on failover and run the failover (and connection switch) yourself — Snowflake does not switch over automatically. Failover is also blocked while a refresh is in progress, so waiting for or canceling that refresh adds to RTO.

Client Redirect (Connection Failover)

Manually changing application connection targets after failover is operationally expensive, so Snowflake provides the Client Redirect (Connection Failover) feature (Business Critical or higher). If applications connect through the connection URL of a connection object, running ALTER CONNECTION ... PRIMARY in the target account redirects them to the new Primary account. Promoting the Failover Group does not switch the connection by itself, so you run both.

-- Connection URL format (Client Redirect)
-- https://<org_name>-<connection_name>.snowflakecomputing.com

-- Source account: create the primary connection and allow failover to the target
CREATE CONNECTION prod_connection;
ALTER CONNECTION prod_connection ENABLE FAILOVER TO ACCOUNTS myorg.target_account;

-- Target account: create the secondary connection
CREATE CONNECTION prod_connection
  AS REPLICA OF myorg.source_account.prod_connection;

-- On failover (run manually in the target account): switch the Primary connection
ALTER CONNECTION prod_connection PRIMARY;

Replication Monitoring

-- Check replication lag history (run on the Secondary account)
SELECT timestamp, lag_seconds, primary_snapshot_timestamp
FROM TABLE(INFORMATION_SCHEMA.REPLICATION_GROUP_LAG_HISTORY(
  REPLICATION_GROUP_NAME => 'prod_dr_group'));

-- Refresh history and duration
SELECT
  replication_group_name,
  phase_name,
  start_time,
  end_time,
  DATEDIFF('SECOND', start_time, end_time) AS duration_sec,
  primary_snapshot_timestamp
FROM SNOWFLAKE.ACCOUNT_USAGE.REPLICATION_GROUP_REFRESH_HISTORY
WHERE start_time >= DATEADD(DAY, -7, CURRENT_TIMESTAMP())
ORDER BY start_time DESC;

-- Monitor credit consumption for replication
SELECT
  start_time::DATE AS usage_date,
  replication_group_name,
  SUM(credits_used) AS total_credits,
  SUM(bytes_transferred) / POWER(1024, 3) AS gb_transferred
FROM SNOWFLAKE.ACCOUNT_USAGE.REPLICATION_GROUP_USAGE_HISTORY
WHERE start_time >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY usage_date DESC;

Edition Requirements Summary

FeatureStandardEnterpriseBusiness Critical
Database Replication (read-only)YesYesYes
Failover GroupNoNoYes
Client RedirectNoNoYes
Cross-cloud replicationYesYesYes

DR Design Best Practices

  • Include roles and network policies in the Failover Group: If you replicate only databases but lose your RBAC configuration, you cannot access the data. Include ROLES/USERS/NETWORK POLICIES in OBJECT_TYPES.
  • Run regular DR drills: Execute the failover → failback procedure quarterly and record the measured RTO.
  • Align REPLICATION_SCHEDULE with your RPO requirement: A secondary can lag by up to twice the interval, so for an RPO of 10 minutes set REPLICATION_SCHEDULE = '5 MINUTE' or less and configure lag-monitoring alerts.
  • Adopt Client Redirect to eliminate application-side changes: Have applications use the connection URL so that failover only requires running ALTER CONNECTION ... PRIMARY, with no application reconfiguration.
  • Estimate cross-region transfer costs: Transfers between different cloud regions are billed per GB, so estimate the cost of the initial full snapshot in advance.

Check Your Understanding

Architecture / DR

Question 1

A company on Business Critical Edition wants to build a DR site in EU-WEST-1 for its production environment in US-EAST-1 (AWS). The requirements are: RPO within 10 minutes, no application connection-string changes during failover, and replication that includes roles and network policies. Which configuration is most appropriate?

  1. Replicate each database individually with Database Replication, and manually change the application's connection string on failover.
  2. Failover Group (OBJECT_TYPES = DATABASES, ROLES, USERS, NETWORK POLICIES) + Client Redirect (connection URL) + REPLICATION_SCHEDULE = '5 MINUTE'.
  3. Use Snowpipe to copy all table data to a stage in EU-WEST-1, and use a Task to load it on a schedule.
  4. Set Time Travel's DATA_RETENTION_TIME_IN_DAYS to 90 days to maximize data protection.

Correct answer: B

B is the only option that meets all three requirements. Including ROLES/USERS/NETWORK POLICIES in the Failover Group's OBJECT_TYPES replicates account-level objects too. Client Redirect (connection URL) means failover only requires switching the connection with ALTER CONNECTION ... PRIMARY, so the application's connection target does not change. A secondary can lag by up to twice the schedule interval, so REPLICATION_SCHEDULE = '5 MINUTE' keeps the lag within about 10 minutes and meets the 10-minute RPO. Promotion (ALTER FAILOVER GROUP ... PRIMARY) is still run manually, not automatically. A lacks Client Redirect and requires manual connection-string changes, and database-level replication cannot replicate roles or network policies. C is data copying, not replication, and cannot replicate roles or policies. D is Time Travel, which is unrelated to replication.

Frequently Asked Questions

What is the difference between Database Replication and Failover Group?

Database Replication replicates individual databases to another region or account and is available on all editions (promoting the secondary, i.e. failover, requires Business Critical or higher). Failover Group bundles multiple databases, shares, users/roles, warehouses, and other objects into a single group that can fail over together — it requires Business Critical or higher. For DR design, using a Failover Group lets you fail over not only databases but also account-level objects such as roles and network policies in one shot.

How are replication costs incurred?

Replication costs have two main components: (1) Data transfer cost — charges for moving data from the source region to the target region (free within the same cloud and region), and (2) Compute cost — Serverless Credits consumed when creating incremental replication snapshots. The initial full snapshot is the most expensive; after that, only deltas are transferred, so costs drop over time. You can monitor credit usage for failover groups and replication groups via the REPLICATION_GROUP_USAGE_HISTORY view.

How can I check replication lag?

Run the INFORMATION_SCHEMA.REPLICATION_GROUP_LAG_HISTORY table function in the target account to get how far the secondary group has lagged behind the primary over time. You can also check refresh history and duration via the SNOWFLAKE.ACCOUNT_USAGE.REPLICATION_GROUP_REFRESH_HISTORY view to continuously monitor the gap against your RPO target. The Admin » Accounts » Replication page in Snowsight also shows the replication lag (time since the last refresh) for each group.

Check what you learned with practice questions

Practice with certification-focused question sets

Try free questions
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Snowflake

Snowflake Certifications: All 11 Exams Explained (2026)

Every SnowPro certification on Snowflake's official list — C...

Snowflake

Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)

All 11 SnowPro exams compared by difficulty in a ranking and...

Snowflake

Snowflake Study Guide: Fastest Pass Route by Exam (2026)

How to pass SnowPro certifications efficiently — official ma...

Snowflake

SnowPro Core (COF-C03): Complete Exam Guide (2026)

Pass the SnowPro Core exam — five domains, scope, sample que...

Snowflake

SnowPro Associate Platform (SOL-C01): Current Status & What to Take Next (2026)

As of October 2026, SnowPro Associate: Platform (SOL-C01) is...

Browse all Snowflake articles (103)
© 2026 NicheeLab All rights reserved.