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). Available on Business Critical Edition or higher.
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| Type | Scope | Failover | Edition Requirement |
|---|---|---|---|
| Database Replication | Individual databases | Not supported (manual switch) | Standard or higher |
| Replication Group | Multiple DBs + shares | Not supported | Business Critical or higher |
| Failover Group | Multiple DBs + roles + warehouses + network policies, etc. | Supported (automatic/manual) | Business Critical or higher |
-- 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;On a DR event, promote the Failover Group on the target account side to Primary. After promotion, the Failover Group on the original source account is demoted to Secondary.
-- Promote to Primary on the target account (DR activation)
ALTER FAILOVER GROUP prod_dr_group PRIMARY;
-- 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;| Metric | Definition | How to control in Snowflake | Typical value |
|---|---|---|---|
| RPO (Recovery Point Objective) | Maximum acceptable data loss window | REPLICATION_SCHEDULE interval | 10 min - 1 hour |
| RTO (Recovery Time Objective) | Maximum acceptable downtime until recovery | Execution time of ALTER FAILOVER GROUP ... PRIMARY | Minutes to tens of minutes |
RPO is determined by the REPLICATION_SCHEDULE interval. If you set it to 10 minutes, you may lose up to the last 10 minutes of data in the worst case. RTO depends on how long the failover command takes, which is driven by metadata volume (number of tables, views, etc.) rather than database size.
Manually changing application connection targets after failover is operationally expensive, so Snowflake provides the Client Redirect (Connection Failover) feature. By using an Organization-level URL as the connection URL, clients are automatically redirected to the new Primary account on failover.
-- Organization URL format (supports Client Redirect)
-- https://<org_name>-<connection_name>.snowflakecomputing.com
-- Create the Connection object
CREATE CONNECTION prod_connection
AS REPLICA OF myorg.source_account.prod_connection;
-- Switch the Primary connection
ALTER CONNECTION prod_connection PRIMARY;-- Check replication lag (run on the Secondary account)
SELECT SYSTEM$REPLICATION_LAG('analytics');
-- 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,
database_name,
SUM(credits_used) AS total_credits,
SUM(bytes_transferred) / POWER(1024, 3) AS gb_transferred
FROM SNOWFLAKE.ACCOUNT_USAGE.REPLICATION_USAGE_HISTORY
WHERE start_time >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY usage_date DESC;| Feature | Standard | Enterprise | Business Critical |
|---|---|---|---|
| Database Replication (read-only) | Yes | Yes | Yes |
| Failover Group | No | No | Yes |
| Client Redirect | No | No | Yes |
| Cross-cloud replication | No | No | Yes |
Architecture / DR
問題 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?
正解: 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 (Organization URL) removes the need to change the application's connection target on failover. REPLICATION_SCHEDULE = '10 MINUTE' delivers a 10-minute RPO. A lacks Client Redirect and requires manual connection-string changes. C is data copying, not replication, and cannot replicate roles or policies. D is Time Travel, which is unrelated to replication.
What is the difference between Database Replication and Failover Group?
Database Replication replicates individual databases to another region or account and is available on Business Critical Edition or higher. Failover Group bundles multiple databases, shares, users/roles, warehouses, and other objects into a single group that can fail over together — it also 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 via the REPLICATION_USAGE_HISTORY view.
How can I check replication lag?
Run SELECT SYSTEM$REPLICATION_LAG() against the secondary database to get the lag time relative to the primary. 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 Snowsight replication dashboard also visualizes lag trends as a graph.
Practice with certification-focused question sets
無料で問題を解いてみる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.
Snowflake Certifications: All 11 Exams Explained (2026)
Every SnowPro certification — Associate, Core, Specialty, Ad...
Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)
All 11 SnowPro exams ranked by difficulty with study-time es...
Snowflake Study Guide: Fastest Pass Route by Exam (2026)
How to pass SnowPro certifications efficiently — official ma...
SnowPro Core (COF-C03): Complete Exam Guide (2026)
Pass the SnowPro Core exam — six domains, scope, sample ques...
SnowPro Associate Platform (SOL-C01): Complete Guide (2026)
The entry-level SnowPro Associate exam — scope, weighting, s...