Failing Over Account Objects¶
This topic describes the steps necessary to fail over replicated account objects across multiple accounts in different regions for disaster recovery.
Prerequisite Requirements¶
Enable replication for a primary failover group in a set of accounts.
Create at least one secondary failover group (i.e. replica) of the primary failover group in one or more accounts and regularly refresh (i.e. synchronize) the replica with the latest updates to the objects in the failover group.
For instructions, see Replicating Account Objects.
Promoting a Target Account to Serve as the Source Account¶
To promote a target account to serve as the source account, execute the ALTER FAILOVER GROUP … PRIMARY command.
Promote a Secondary Failover Group to Primary Failover Group¶
Note
The example in this section must be executed by a role with the FAILOVER privilege.
For instructions on creating a custom role with a specified set of privileges, see Creating Custom Roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
The following example promotes myaccount2
in the current myorg
organization to serve as the source account for replication of the
objects specified in the failover group myfg
.
Executed from
myaccount2
account:ALTER FAILOVER GROUP myfg PRIMARY;
Resume Scheduled Replication in Target Accounts¶
On failover, scheduled refreshes on all secondary failover groups are suspended. ALTER FAILOVER GROUP … RESUME must be executed in each target account with a secondary failover group to resume automatic refreshes.
ALTER FAILOVER GROUP myfg RESUME;