CertSafari
    Snowflake SnowPro Advanced: Administrator (ADA-C02)· Lessons

    Domain 6 · Lesson 23/24

    Snowflake replication groups and failover groups

    Manage data replication.

    21 min read
    4.5% of exam
    10 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Tell primary and secondary objects apart and pick database replication, a replication group or a failover group for a given requirement
    • Enable replication, create a primary group with a schedule, and create and refresh its secondary
    • Work out which objects an edition can replicate, including replication to a lower-edition account
    • Predict how replication affects roles, grants and locally created objects in the target account
    • Explain what replication does to clustered tables, materialized views, external and Iceberg tables, policies and tags, streams, tasks, stages, pipes and clones
    • Predict the impact of database failover across multiple accounts, including which replicas can be promoted and which stay read-only
    • Identify the appropriate failover or failback procedure for a full outage, a partly failed failover or a refresh still in progress

    Key concept

    Primary and secondary objects — Replication copies objects from a source account into target accounts in the same organization. The source copy is the primary and stays writable. Each target copy is a secondary: a read-only replica that is only as current as its last refresh.

    1.Primary and secondary objects, their uses and database failover

    Replication keeps a copy of your objects in another Snowflake account, and that account can be in a different region or on a different cloud platform. The account that owns the writable originals is the source account, and those originals are primary objects. Every account that receives a copy is a target account, and its copies are secondary objects. Both accounts must belong to the same organization. You can replicate between any regions in one region group. Replicating from a commercial region to a government or Virtual Private Snowflake region needs Snowflake Support.

    Secondaries are read-only, and that shapes what they are good for. One use is a reporting copy that sits close to a team in another region, where nobody ever writes to it. The other is disaster recovery, where the copy waits in a second region and gets promoted to primary if the source region fails. Database replication works on every edition, so an Enterprise account can give a BI team in another region a local read-only secondary of its SALES database with no failover setup at all. This older per-database method is enabled with ALTER DATABASE … ENABLE REPLICATION TO ACCOUNTS and kept current with ALTER DATABASE … REFRESH.

    A refresh moves only what changed since the previous refresh of that database, and the target sees a point-in-time consistent picture. A secondary is therefore never live. It shows the source as it was when the last refresh completed, and the replication schedule decides how far behind it can fall.

    Database failover moves the single writable copy to another account. It never creates a second one. Running ALTER DATABASE … PRIMARY in a target account makes that secondary writable, and in the same step the old primary becomes a read-only secondary. However many accounts hold a replica, only one of them can accept writes at any moment. Failover groups promote whole sets of databases and account objects together, and Snowflake recommends them over this per-database method.

    With multiple accounts, two lists decide what each one can do. ENABLE REPLICATION TO ACCOUNTS names the accounts that may hold a replica. ENABLE FAILOVER TO ACCOUNTS names the accounts where that replica may be promoted, and failover needs Business Critical or higher. Take mydb1 replicated to myorg.account2 and myorg.account3 with failover enabled only to account2. If the source region fails, account2 can take over. Account3 keeps a read-only copy that cannot be promoted until the primary enables failover to it. Failover can be enabled before or after the replica exists, so add every account that might need to take over while the source is still healthy.

    Give each secondary database the same name as its primary. A view that queries mydb1.s1.t1 by its fully qualified name breaks in a secondary called anything else, and you will usually discover that only after a failover, when the replica becomes the copy everyone depends on.

    Checkpoint 1 of 8· Exam question

    An Enterprise edition account holds a SALES database. The BI team works in a different cloud region and needs a read-only copy close to them for reporting. No failover capability is required. What is the MOST appropriate approach?

    Sources1234

    2.Replication groups versus failover groups

    Group-based replication replicates a set of objects as one unit. A replication group lists object types and objects in the source account and the target accounts allowed to receive them, and it gives those targets read-only copies. A failover group does all of that and can also fail over. Any account named in its allowed accounts can promote its secondary group to primary, and the objects in that account then become writable. If a requirement says the second account must be able to take over, you need a failover group. A replication group cannot be promoted.

    Replication features by Snowflake edition
    FeatureStandardEnterpriseBusiness CriticalVPS
    Database replicationYesYesYesYes
    Share replicationYesYesYesYes
    Replication GroupYesYesYesYes
    Account object (other than database and share) replicationNoNoYesYes
    Failover GroupNoNoYesYes
    Data protected with Tri-Secret SecureNoNoYesYes

    The account objects that need Business Critical are users, roles (account and database roles), warehouses, resource monitors, network policies, account-level parameters, integrations (security, API, notification, storage and external access) and listings. Upgrading an account to Business Critical does not switch failover on immediately, because it can take up to 12 hours for failover capabilities to become available.

    Group membership follows strict rules, and violating them is a common reason a group fails to create:

    • A database or share can be in only one failover group.
    • It can be in several replication groups, as long as each one replicates to a different target account.
    • It cannot be in a failover group and a replication group at the same time.
    • An account can have only one replication or failover group that contains objects other than databases or shares.
    • Only outbound shares replicate. Inbound shares from providers do not.

    A database that was already enabled with ALTER DATABASE must have replication disabled with SYSTEM$DISABLE_DATABASE_REPLICATION before it can join a group. Data that was already replicated is not copied again. The next refresh sends only the changes.

    The replication method you pick decides what access control the target account ends up with. Database replication with ALTER DATABASE copies no privilege grants at all, neither on existing objects nor future grants, so its secondary arrives with data but without the source's record of who may read it. A group with ROLES in OBJECT_TYPES does carry grants, but only for the object types in that same group. With ROLES alone, only the role hierarchy arrives. Adding USERS brings role grants to users, and a grant on a warehouse arrives only if WAREHOUSES is listed as well. Users, roles and warehouses all have to sit in the account's single group for account objects, so settle that group's access-control scope before you create it, not after the first failover drill shows a role that cannot reach its warehouse.

    Checkpoint 2 of 8· Check yourself

    Your Business Critical account replicates databases DB1 and DB2 to an account in a second region through a replication group named rg_dr. The primary region goes down, and the business needs the second account to start accepting writes. What is true?

    Sources125678

    3.Setting up account replication and scheduled refresh

    Replication starts at the organization level. An organization administrator sets ENABLE_ACCOUNT_DATABASE_REPLICATION to true on every source and target account. Use the organization and account name for this, not the legacy account locator, because the locator gives unexpected results when several accounts share one locator in different regions.

    Run once per source and target account by an organization administratorsql
    SELECT SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER('<organization_name>.<account_name>', 'ENABLE_ACCOUNT_DATABASE_REPLICATION', 'true');

    Next, create the primary group in the source account. OBJECT_TYPES says which kinds of object replicate, ALLOWED_DATABASES lists the databases, ALLOWED_ACCOUNTS lists the targets, and REPLICATION_SCHEDULE sets automatic refresh. The schedule goes on the primary group. You do not need a task or cron job in the target. To add a database to the group, the role needs MONITOR on that database. To create a failover group, it needs CREATE FAILOVER GROUP on the account, which only ACCOUNTADMIN can grant.

    Primary failover group for account objects and two databases, refreshed every 10 minutessql
    CREATE FAILOVER GROUP myfg OBJECT_TYPES = USERS, ROLES, WAREHOUSES, RESOURCE MONITORS, DATABASES ALLOWED_DATABASES = db1, db2 ALLOWED_ACCOUNTS = myorg.myaccount2, myorg.myaccount3 REPLICATION_SCHEDULE = '10 MINUTE';

    Then sign in to each target account and create the secondary with CREATE FAILOVER GROUP myfg AS REPLICA OF myorg.myaccount1.myfg;. If the primary has a schedule, this creation runs the first refresh automatically. A manual refresh with ALTER FAILOVER GROUP myfg REFRESH; needs the REPLICATE privilege on the group, and the role that owns the group in the target account grants it. A Standard or Enterprise account does the same thing with a replication group.

    Replication group (any edition) with a refresh schedule set on the primarysql
    CREATE REPLICATION GROUP myrg
        OBJECT_TYPES = DATABASES
        ALLOWED_DATABASES = db1, db2
        ALLOWED_ACCOUNTS = myorg.myaccount2
        REPLICATION_SCHEDULE = '10 MINUTE';

    Checkpoint 3 of 8· Fill the gap

    You create this primary failover group in the source account. Each target account should then refresh every 10 minutes, with no task or cron job set up in the target. Which parameter completes the statement?

    CREATE FAILOVER GROUP myfg OBJECT_TYPES = USERS, ROLES, WAREHOUSES, RESOURCE MONITORS, DATABASES ALLOWED_DATABASES = db1, db2 ALLOWED_ACCOUNTS = myorg.myaccount2, myorg.myaccount3  ?  = '10 MINUTE';

    Sources5

    4.Replicating to a lower-edition account

    By default, Snowflake blocks a Business Critical source from replicating to a lower-edition target. Business Critical exists for very sensitive data, and the block stops an administrator from copying that data down by accident. The block applies in two cases. One is a group with only databases and/or shares in a Business Critical (or higher) account where an allowed target is on a lower edition. The other is a source covered by a HIPAA/HITRUST business associate agreement where a target has no such agreement, whatever that target's edition.

    If the target has to stay on Enterprise, for example to control cost, add IGNORE EDITION CHECK to the replication group statement. You do not change an account parameter, and you do not turn off Business Critical features on the source. The lower-edition target still receives only what its edition supports, which means databases and shares. Users, roles, warehouses, failover and Tri-Secret Secure protection all stay Business Critical features.

    Checkpoint 4 of 8· Check yourself

    To keep costs down, a team wants its Business Critical source account to replicate SALES_DB to a target account that will stay on Enterprise Edition. Snowflake blocks the replication group. What should the team do, and what will the target end up with?

    Checkpoint 5 of 8· Exam question

    An administrator configures a replication group from a Business Critical source account to an Enterprise target account. Creation fails with an edition error. The target must stay on Enterprise to control cost. What should the administrator do?

    Sources8

    5.How replication affects roles, grants and local objects

    When you replicate roles, the access model comes with them. Account and database roles arrive with their privileges and their role hierarchy. If users are replicated too, the grants of roles to users arrive as well. If roles are replicated, each database refresh also brings the grants on the secondary database and its schemas, tables and views up to date. Two privileges are deliberately left out: REPLICATE and FAILOVER on the groups themselves. You grant those separately in each account, so being able to promote an account is never something you get by copying it.

    Privileges on replication and failover groups
    PrivilegeAllowsGranted by
    CREATE REPLICATION GROUP / CREATE FAILOVER GROUPCreating the group in an accountACCOUNTADMIN
    REPLICATERefreshing a secondary groupRole with OWNERSHIP on the group
    FAILOVERPromoting a secondary failover group to primaryRole with OWNERSHIP on the group
    MODIFY / MONITORChanging settings / viewing detailsRole with OWNERSHIP on the group

    Every secondary object in the target is read-only, and so is every replicated object type. If USERS replicate, you cannot create or change users in the target. If ROLES replicate, you cannot create roles there or grant privileges on secondary objects. You can still create local databases and shares, and you can grant privileges on those local objects to the replicated roles.

    Scripts used to pre-build the target cause trouble. Users and roles created in the target by any route other than replication have no global identifier. A refresh drops every object of a replicated type that has no global identifier, or the first refresh may fail with an error to protect them. Before the first refresh, either apply global IDs to the scripted objects or leave them out of the target.

    Checkpoint 6 of 8· Match them up

    Match each situation in a target account that replicates USERS and ROLES to what replication does with it.

    Tap a term, then the definition that fits it.

    Sources12

    6.What replication does to specific objects

    Replicating a database brings most of what it contains, but not everything. Unsupported objects are skipped silently, so they will be missing from the target after a failover. Know the gaps before you rely on a secondary.

    Replication behaviour of objects inside a replicated database
    ObjectBehaviour on the secondary
    Clustered tablesArrive already sorted, so no reclustering on the secondary. Automatic Clustering starts only when the database is promoted
    Materialized viewsReplicated
    External tables, hybrid tables, event tables, temporary tablesNot replicated
    Apache Iceberg tablesOnly Snowflake-managed ones, and only if the external volume is replicated too
    Stages and pipesReplicated only by replication and failover groups, not by database replication
    StreamsFail to replicate unless the base object is in the same database or the same group
    TasksAlways arrive suspended with ALTER DATABASE … REFRESH; with groups, owner role must be on the secondary

    A clustered table arrives with its micro-partitions already in the primary's sort order, so reclustering it again would be wasted work. After promotion, the new primary starts Automatic Clustering and the old primary stops monitoring its tables. The clustering mechanism itself is covered in Clustering keys and automatic clustering. The materialized views in a database replicate with it. External tables are skipped. Of the Apache Iceberg tables, only Snowflake-managed ones replicate. The secondary can read them only if the external volume, an account-level object that points at your cloud storage, is replicated too. Failover groups need Business Critical for that, but replication groups can carry external volumes on any edition.

    References that cross groups decide whether a refresh succeeds. Masking policies, row access policies and tags all replicate. Dynamic data masking and external tokenization explains how they protect data. A policy that lives in a different group from the tables it protects is a dangling reference. The group holding the policy must be refreshed before any group with objects that reference it, otherwise data can arrive without the policy that protects it. A stream fails replication outright if its base object is in a database in another group. A packages policy whose database is not replicated fails the account-object refresh with a dangling references error.

    Tasks bring their grants only if their owner role exists on the secondary. Otherwise the role performing the refresh owns the task and the task arrives suspended. If roles and tasks are in different groups, refresh the roles group first. Stages and pipes need a replication or failover group, so a UDF that imports code from a stage breaks on a database-only replica. A zero-copy clone replicates logically only if the database holding its source table is in the same group too. Usage history in the SNOWFLAKE database is not part of any group and stays in the source account, as covered in ACCOUNT_USAGE vs INFORMATION_SCHEMA. In the target, check replication itself with INFORMATION_SCHEMA.REPLICATION_GROUP_REFRESH_HISTORY.

    Checkpoint 7 of 8· Check yourself

    Stream S1 lives in APP_DB and tracks changes on a table in RAW_DB. APP_DB is in failover group fg_app, and RAW_DB is in a separate failover group, fg_raw. What will happen when fg_app is replicated, and what fixes it?

    Sources21

    7.Choosing the appropriate failover or failback procedure

    Every failover ends in the same promotion, but the procedure around it decides how consistent the promoted account is and how long the switch takes. Pick it in the runbook before an outage, not during one. The promotion itself, signing in to the target and making its secondary failover groups primary, works the same way in each case. What changes is how many groups move at once and what happens to refreshes still running.

    Which failover or failback procedure fits which situation
    SituationAppropriate procedure
    The whole account must take over, in an outage or a planned drillBulk failover in Snowsight: select all failover groups and connections and promote them at the same time
    A bulk failover finished for some groups but not othersRun another bulk failover, or fail over the remaining groups one at a time from Admin » Accounts » Replication » Groups
    A refresh is running and consistency matters more than minutesWait for the refresh, the default; in SQL, ALTER FAILOVER GROUP … SUSPEND, then ALTER FAILOVER GROUP … PRIMARY
    A refresh is running and some groups cannot waitExit with current progress: fail over the groups not being refreshed and refresh the skipped ones later
    A refresh is running and the failover is urgentCancel refreshes and force failover, or SUSPEND IMMEDIATE in SQL, then clean up inconsistencies on the secondary
    The original region is backRefresh the failover groups there, promote them back to primary (failback), then point the connection URL back

    Bulk failover is the default for a reason. Promoting groups one by one leaves a window where users and roles are writable in one account while the databases they own are still writable in the other. Single-group promotion is the repair tool: when one group out of five refuses to move, you retry that group alone instead of rerunning the whole switch.

    An in-progress refresh is the usual reason a failover stalls, because Snowflake will not promote a group while a refresh is running. The three answers trade time for consistency. Waiting leaves both sides consistent. Exiting with current progress moves most groups now and leaves you a second pass. Forcing the failover moves everything now, but cancelling a refresh in the SECONDARY_DOWNLOADING_METADATA or SECONDARY_DOWNLOADING_DATA phase can leave the target inconsistent, so check REPLICATION_GROUP_REFRESH_PROGRESS before choosing it.

    Checkpoint 8 of 8· Check yourself

    A region outage is costing money every minute. In Snowsight you start a bulk failover from the target account, and two of the selected failover groups are partway through a refresh. The business wants every group writable now and accepts some cleanup afterwards. Which option fits?

    Sources910

    Sources

    (10)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Database replication and share replication are available on all editions.”
      ↩︎ Primary and secondary objects, their uses and database failover
      “Replication is supported across regions and across cloud platforms.”
      ↩︎ Primary and secondary objects, their uses and database failover
      “Replication and failover groups provide point-in-time consistency for the objects on the target account.”
      ↩︎ Primary and secondary objects, their uses and database failover
      “Replication groups provide read-only access for the replicated objects.”
      ↩︎ Replication groups versus failover groups
      “Includes privileges granted to roles, as well as roles granted to roles (that is, hierarchies of roles).”
      ↩︎ How replication affects roles, grants and local objects
      “The REPLICATE and FAILOVER privileges are not replicated.”
      ↩︎ How replication affects roles, grants and local objects
      “Only Snowflake-managed Iceberg tables are supported. Replication for Iceberg tables requires external volume replication.”
      ↩︎ What replication does to specific objects
      “Supported for replication and failover groups only. Not supported for database replication.”
      ↩︎ What replication does to specific objects
      “Replicated objects in each target account are referred to as secondary objects and are replicas of the primary objects in the source account.”
      ↩︎ Key concept
      “A failover group is a replication group that can also fail over.”
      ↩︎ Exam trap 1
      “Objects that are not supported for replication are skipped during replication and won’t be available in the target account after failover.”
      ↩︎ Exam trap 3
      “Replication of all other objects is only available for Business Critical Edition (or higher).”
      ↩︎ Prediction
      “Database replication and share replication are available on all editions. Replication of all other objects is only available for Business Critical Edition (or higher).”
      ↩︎ Checkpoint
    2. 2.
      “ALTER DATABASE … ENABLE REPLICATION TO ACCOUNTS command”
      ↩︎ Primary and secondary objects, their uses and database failover
      “An object cannot be in both a failover group and a replication group.”
      ↩︎ Replication groups versus failover groups
      “An account can only have one replication or failover group that contains objects other than databases or shares.”
      ↩︎ Replication groups versus failover groups
      “If ROLES are also replicated to the target account, new roles cannot be created or modified in that target account.”
      ↩︎ How replication affects roles, grants and local objects
      “reclustering is not performed again on the clustered tables in the secondary database, which would be redundant.”
      ↩︎ What replication does to specific objects
      “group with the security policy must be replicated before any replication group that contains objects that reference the policy”
      ↩︎ What replication does to specific objects
      “The primary database must include both the stream and its base object or”
      ↩︎ What replication does to specific objects
      “When tasks are replicated using database replication (using ALTER DATABASE … REFRESH), tasks are always replicated in a suspended state.”
      ↩︎ What replication does to specific objects
      “If roles and tasks are in different replication or failover groups, refresh the group containing roles before refreshing the group containing tasks.”
      ↩︎ What replication does to specific objects
      “Include both databases in replication group myrg to logically replicate t2 to the target account”
      ↩︎ What replication does to specific objects
      “Stream replication does not support replication across databases in different replication groups.”
      ↩︎ What replication does to specific objects
      “the refresh operation drops any account objects of the types in the OBJECT_TYPES list in the target account that have no global identifier.”
      ↩︎ Exam trap 2
      “the refresh operation drops any account objects of the types in the OBJECT_TYPES list in the target account that have no global identifier.”
      ↩︎ Checkpoint
    3. 3.
      “When promoted, the database becomes writeable. At the same time, the previous primary database becomes a read-only secondary database.”
      ↩︎ Primary and secondary objects, their uses and database failover
      “Snowflake strongly recommends using the account replication feature to replicate and failover databases.”
      ↩︎ Primary and secondary objects, their uses and database failover
    4. 4.
      “The replica of this primary database in any one of these accounts (i.e. a secondary database) can be promoted to serve as the primary database.”
      ↩︎ Primary and secondary objects, their uses and database failover
      “Failover/Failback requires Business Critical (or higher).”
      ↩︎ Primary and secondary objects, their uses and database failover
      “the primary database must have failover enabled to the target account where the secondary database is located”
      ↩︎ Primary and secondary objects, their uses and database failover
      “enabling failover for a primary database can be done either before or after a replica of the primary database has been created”
      ↩︎ Primary and secondary objects, their uses and database failover
      “If a secondary database has a different name from the primary database, then these object references would break in the secondary database.”
      ↩︎ Primary and secondary objects, their uses and database failover
      “the primary database must have failover enabled to the target account where the secondary database is located”
      ↩︎ Exam trap 4
    5. 5.
      “When you upgrade an account to Business Critical Edition (or higher), it might take up to 12 hours for failover capabilities to become available.”
      ↩︎ Replication groups versus failover groups
      “The organization administrator must enable replication for the source and target accounts.”
      ↩︎ Setting up account replication and scheduled refresh
      “the initial refresh of the secondary failover group is automatically executed when the secondary failover group is created”
      ↩︎ Setting up account replication and scheduled refresh
      “Target accounts do not have Tri-Secret Secure or private connectivity to the Snowflake service, such as AWS PrivateLink, enabled by default.”
      ↩︎ Setting up account replication and scheduled refresh
    6. 6.
      “Privileges granted on database objects are not replicated to a secondary database.”
      ↩︎ Replication groups versus failover groups
    7. 7.
      “Replicating roles implicitly includes all grants for object types included in the replication group.”
      ↩︎ Replication groups versus failover groups
      “If the USERS object type is also included, then role grants to users are also replicated.”
      ↩︎ Replication groups versus failover groups
    8. 8.
      “Objects other than databases, external volumes, and shares must be in the same replication group.”
      ↩︎ Replication groups versus failover groups
      “Allows replicating objects to accounts on lower editions in either of the following scenarios:”
      ↩︎ Replicating to a lower-edition account
      “with only database and/or share objects is in a Business Critical (or higher) account”
      ↩︎ Replicating to a lower-edition account
      “Both scenarios are prohibited by default”
      ↩︎ Replicating to a lower-edition account
    9. 9.
      “For the most consistent and reliable failover experience, select all the applicable failover groups and connections and promote them all at the same time.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “If the failover operation didn’t complete for all failover groups, you can perform another bulk failover.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “You typically use this procedure if you encounter a problem failing over one group, and you need to retry the failover only for that group.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “To fail over only the failover groups that aren’t currently being refreshed, select Exit with current progress.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “In that case, you might need to clean up any inconsistencies on the secondary system from the interrupted refreshes.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “To ensure data integrity, Snowflake prevents failover if a refresh operation is in progress.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “canceling a refresh operation in the SECONDARY_DOWNLOADING_METADATA or SECONDARY_DOWNLOADING_DATA phase might result in an inconsistent state on the target account.”
      ↩︎ Choosing the appropriate failover or failback procedure
      “To ensure data integrity, Snowflake prevents failover if a refresh operation is in progress.”
      ↩︎ Exam trap 5
      “To cancel the refresh operations and continue the failover, select Cancel refreshes and force failover.”
      ↩︎ Checkpoint
    10. 10.
      “Failback: Promote the failover group(s) in the Snowflake account where the outage occurred to again serve as the primary failover group(s).”
      ↩︎ Choosing the appropriate failover or failback procedure

    Continue to part 2 of 2

    Snowflake failover, failback and client redirect

    Spotted a mistake, or was something unclear? Tell us.