Categories:

System Functions (System Control)

SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER

Enables Database Replication for a specified account in an organization. Enabling Database Replication allows account administrators (users with the ACCOUNTADMIN role) to promote local databases as primary databases and create replicas (i.e. secondary databases) of these primary databases in accounts in other regions.

Call the SQL function once for each account in your organization for which you are enabling Database Replication. This includes each account that you intend to contain a primary or secondary database.

Syntax

SELECT SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER('<account_locator>',
  'ENABLE_ACCOUNT_DATABASE_REPLICATION', 'true');

Arguments

<account_locator>

Locator of an account for which you are enabling Database Replication. Retrieve the set of accounts in your organization using SHOW ORGANIZATION ACCOUNTS. The SQL command returns details about each account, including the account locator.

Usage Notes

  • Only organization administrators (i.e. users with the ORGADMIN role) can call this SQL function.

  • When Database Replication is enabled for an account using this SQL function, the SHOW REPLICATION ACCOUNTS output includes the account.

  • If you have more than one account with the same account locator in different regions, to enable replication, contact Snowflake Support.

Examples

The following example enables Database Replication for the myaccount1 and myaccount2 accounts:

SELECT SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER('myaccount1',
  'ENABLE_ACCOUNT_DATABASE_REPLICATION', 'true');

SELECT SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER('myaccount2',
  'ENABLE_ACCOUNT_DATABASE_REPLICATION', 'true');