alterDatabaseReplication

Last updated: January 27, 2026

Alters replication and failover settings on an existing Snowflake database. Supports enabling/disabling replication to accounts, refreshing replica databases, managing failover configurations, and promoting replica databases to primary.

Note: This change type does not support automatic rollback or database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).

Available attributes

Attribute

Type

Description

Required

databaseName

String

Name of the database to alter

Yes

ifExists

Boolean

Only alter if the database exists using IF EXISTS

No

refresh

Boolean

Refresh replica database with changes from primary

No*

primary

Boolean

Promote replica database to primary

No*

enableReplicationForAccounts

Nested

Enable replication to specified accounts

No*

disableReplicationForAccounts

Nested

Disable replication to accounts

No*

enableFailoverForAccounts

Nested

Enable failover to accounts (Business Critical)

No*

disableFailoverForAccounts

Nested

Disable failover to accounts

No*

* Exactly one operation (nested element or attribute) must be specified.

enableReplicationForAccounts attributes

Attribute

Type

Description

Required

name

String

Account identifier (e.g., ORGNAME.ACCOUNT_NAME)

Yes

disableReplicationForAccounts attributes

Attribute

Type

Description

Required

name

String

Account identifier (empty element disables all)

No

enableFailoverForAccounts attributes

Attribute

Type

Description

Required

name

String

Account identifier (requires Business Critical)

Yes

disableFailoverForAccounts attributes

Attribute

Type

Description

Required

name

String

Account identifier (empty element disables all)

No

loading

loading

loading

loading