A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/sql/alter-replication-group below:

Website Navigation


ALTER REPLICATION GROUP | Snowflake Documentation

ALTER REPLICATION GROUP

Modifies the properties for an existing replication group.

From the source account, you can perform the following actions:

From the target account, you can perform the following actions:

See also:

CREATE REPLICATION GROUP , DROP REPLICATION GROUP , SHOW REPLICATION GROUPS, SYSTEM$SCHEDULE_ASYNC_REPLICATION_GROUP_REFRESH

Syntax

Source Account

ALTER REPLICATION GROUP [ IF EXISTS ] <name> RENAME TO <new_name>

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET
  [ OBJECT_TYPES = <object_type> [ , <object_type> , ... ] ]
  [ ALLOWED_DATABASES = <db_name> [ , <db_name> , ... ] ]
  [ ALLOWED_SHARES = <share_name> [ , <share_name> , ... ] ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET
  OBJECT_TYPES = INTEGRATIONS [ , <object_type> , ... ]
  ALLOWED_INTEGRATION_TYPES = <integration_type_name> [ , <integration_type_name> ... ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET
  COMMENT = '<string_literal>'

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET
  REPLICATION_SCHEDULE = '{ <num> MINUTE | USING CRON <expr> <time_zone> }'

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET
  ERROR_INTEGRATION = <integration_name>

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SET
  TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name> UNSET
  { COMMENT | REPLICATION_SCHEDULE | ERROR_INTEGRATION } [ , ... ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name> UNSET
  TAG <tag_name> [ , <tag_name> ... ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  ADD <db_name> [ , <db_name> ,  ... ] TO ALLOWED_DATABASES

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  MOVE DATABASES <db_name> [ , <db_name> ,  ... ] TO REPLICATION GROUP <move_to_rg_name>

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  REMOVE <db_name> [ , <db_name> ,  ... ] FROM ALLOWED_DATABASES

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  ADD <share_name> [ , <share_name> ,  ... ] TO ALLOWED_SHARES

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  MOVE SHARES <share_name> [ , <share_name> ,  ... ] TO REPLICATION GROUP <move_to_rg_name>

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  REMOVE <share_name> [ , <share_name> ,  ... ] FROM ALLOWED_SHARES

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  ADD <org_name>.<target_account_name> [ , <org_name>.<target_account_name> ,  ... ] TO ALLOWED_ACCOUNTS
  [ IGNORE EDITION CHECK ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name>
  REMOVE <org_name>.<target_account_name> [ , <org_name>.<target_account_name> ,  ... ] FROM ALLOWED_ACCOUNTS

Copy

Target Account

ALTER REPLICATION GROUP [ IF EXISTS ] <name> REFRESH

ALTER REPLICATION GROUP [ IF EXISTS ] <name> SUSPEND [ IMMEDIATE ]

ALTER REPLICATION GROUP [ IF EXISTS ] <name> RESUME

Copy

Parameters

Source Account

name

Specifies the identifier for the replication group.

RENAME TO new_name
new_name

Specifies the new identifier for the replication group. The new identifier cannot be used if the identifier is already in place for a different replication or failover group.

For more details, see Identifier requirements.

SET ...

Specifies properties to set for the replication group (separated by blank spaces, commas, or new lines).

OBJECT_TYPES = object_type [ , object_type , ... ]

Reset the list of object types to replicate from the source account to target account(s).

Note

For database and share objects:

  • If DATABASES or SHARES are included in the OBJECT_TYPES list, and remain in the OBJECT_TYPES list after the list is reset, the respective allowed objects list (ALLOWED_DATABASES or ALLOWED_SHARES) remains unchanged.

  • If the OBJECT_TYPES list is reset to add or remove DATABASES, the ALLOWED_DATABASES list is set to NULL.

  • If the OBJECT_TYPES list is reset to add or remove SHARES, the ALLOWED_SHARES list is set to NULL.

  • Use the ADD, MOVE, and REMOVE clauses to modify the list of allowed database or share objects.

The following object types are supported:

ACCOUNT PARAMETERS:

Requires Business Critical Edition (or higher).

All account-level parameters. This includes account parameters and parameters that can be set for your account.

DATABASES:

Add database objects to the list of object types. If database objects were already included in the list of specified object types, the ALLOWED_DATABASES list remains unchanged. To modify the list of databases, use the ADD, MOVE, or REMOVE clauses.

INTEGRATIONS:

Requires Business Critical Edition (or higher).

Currently, only security, API, storage, external access, and certain types of notification integrations are supported. For details, see Integration replication.

If integration objects are included in the list of specified object types, the ALLOWED_INTEGRATION_TYPES parameter must be set.

NETWORK POLICIES:

Requires Business Critical Edition (or higher).

All network policies in the source account.

RESOURCE MONITORS:

Requires Business Critical Edition (or higher).

All resource monitors in the source account.

ROLES:

Requires Business Critical Edition (or higher).

All roles in the source account. Replicating roles implicitly includes all grants for object types included in the replication group. For example, if ROLES is the only object type that is replicated, then only hierarchies of roles (that is, roles granted to other roles) are replicated to target accounts. If the USERS object type is also included, then role grants to users are also replicated.

SHARES:

Add share objects to the list of object types. If share objects were already included in the list of specified object types, the ALLOWED_SHARES list remains unchanged. To modify the list of shares, use the ADD, MOVE, or REMOVE clauses.

USERS:

Requires Business Critical Edition (or higher).

All users in the source account.

WAREHOUSES:

Requires Business Critical Edition (or higher).

All warehouses in the source account.

Note

If you replicate users and roles, programmatic access tokens for users are replicated automatically.

ALLOWED_DATABASES = db_name [ , db_name , ... ]

Specifies the database or list of databases for which you are enabling replication from the source account to the target account. In order for you to set this parameter, the OBJECT_TYPES list must include DATABASES.

db_name

Specifies the identifier for the database.

ALLOWED_SHARES = share_name [ , share_name , ... ]

Specifies the share or list of shares for which you are enabling replication from the source account to the target account. In order for you to set this parameter, the OBJECT_TYPES list must include SHARES.

share_name

Specifies the identifier for the share.

Note

If the ALLOWED_DATABASES or ALLOWED_SHARES lists are modified, any objects that were previously in the list and removed will be dropped in any target account with a linked secondary replication group when the next refresh operation occurs.

ALLOWED_INTEGRATION_TYPES = integration_type_name [ , integration_type_name , ... ]

Requires Business Critical Edition (or higher).

Type(s) of integrations for which you are enabling replication from the source account to the target account.

This property requires that the OBJECT_TYPES list include INTEGRATIONS to set this parameter.

The following integration types are supported:

TAG tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ]

Specifies the tag name and the tag string value.

The tag value is always a string, and the maximum number of characters for the tag value is 256.

For information about specifying tags in a statement, see Tag quota for objects.

ADD db_name [ , db_name ,  ... ] TO ALLOWED_DATABASES

Specifies a comma-separated list of databases to add to the list of databases enabled for replication. To add a database, DATABASES must be included in the list of specified object types. If the list of object types does not already include DATABASES, you must add it.

db_name

Specifies the identifier for the database.

MOVE DATABASES db_name [ , db_name ,  ... ] TO REPLICATION GROUP move_to_rg_name

Specifies a comma-separated list of databases to move from one replication group to another replication group. The replication group the databases are being moved to must include DATABASES in the list of specified object types.

db_name

Specifies the identifier for the database.

move_to_rg_name

Specifies the identifier for the replication group the databases are being moved to.

REMOVE db_name [ , db_name ,  ... ] FROM ALLOWED_DATABASES

Specifies a comma-separated list of database to remove from the list of databases enabled for replication.

Note

When you remove a database from a primary replication group, the database is dropped in any target account with a linked secondary replication group when the next refresh operation occurs.

To avoid dropping databases in the target account, you can drop the secondary replication group before the next time the modified primary replication group is replicated to the target account. When you drop the secondary replication group, read-only secondary databases that were included in the group become standalone read-write databases in the target account.

ADD share_name [ , share_name ,  ... ] TO ALLOWED_SHARES

Specifies a comma-separated list of shares to the list of shares for replication. To add a share, SHARES must be included in the list of specified object types. If the list of object types does not already include SHARES, you must add it.

share_name

Specifies the identifier for the share.

MOVE SHARES share_name [ , share_name ,  ... ] TO REPLICATION GROUP move_to_rg_name

Specifies a comma-separated list of shares to move from one replication group to another replication group. The replication group the shares are being moved to must include SHARES in the list of specified object types.

share_name

Specifies the identifier for the share.

move_to_rg_name

Specifies the identifier for the replication group the shares are being moved to.

REMOVE share_name [ , share_name ,  ... ] FROM ALLOWED_SHARES

Specifies a comma-separated list of shares to remove from the list of shares enabled for replication.

Note

When you remove a share from a primary replication group, the share is dropped in any target account with a linked secondary replication group when the next refresh operation occurs.

ADD org_name.target_account_name [ , org_name.target_account_name ,  ... ] TO ALLOWED_ACCOUNTS

Specifies a comma-separated list of target accounts to add to the primary replication group to enable replication of specified objects in the source account to the target account.

org_name

Name of your Snowflake organization.

target_account_name

Target account to which you are enabling replication of the specified objects.

REMOVE org_name.target_account_name [ , org_name.target_account_name ,  ... ] FROM ALLOWED_ACCOUNTS

Specifies a comma-separated list of target accounts to remove from the primary replication group to disable replication of specified objects in the source account to the target account.

org_name

Name of your Snowflake organization.

target_account_name

Target account to which you are disabling replication of the specified objects.

IGNORE EDITION CHECK

Allows replicating objects to accounts on lower editions in either of the following scenarios:

Both scenarios are prohibited by default in an effort to help prevent account administrators for Business Critical (or higher) accounts from inadvertently replicating sensitive data to accounts on lower editions.

Target Account

name

Specifies the identifier for the replication group.

REFRESH

Refreshes the objects in the target (current) account from the source account.

SUSPEND [ IMMEDIATE ]

Suspend the scheduled refresh of the secondary replication group (if the primary replication group has automatically scheduled refresh set using the REPLICATION_SCHEDULE property).

The optional IMMEDIATE clause cancels a scheduled refresh operation that is currently in progress for the secondary replication group (if there is one). Note that there might be a slight delay between the time that the statement returns and the time that the cancellation of the refresh operation is finished.

RESUME

Resume scheduled refresh of the secondary replication group (if the primary replication group has automatically scheduled refresh set using the REPLICATION_SCHEDULE property).

UNSET ...

Specifies one (or more) properties to unset for the replication group, which resets them to the defaults:

You can reset multiple properties with a single ALTER statement; however, each property must be separated by a comma. Also, when resetting a property, you only specify the name; no value is required.

Usage notes Examples Executed from the source account

Add myorg.myaccount3 to the list of target accounts to which replication of specified objects from the source account is enabled:

ALTER REPLICATION GROUP myrg ADD myorg.myaccount3 TO ALLOWED_ACCOUNTS;

Copy

Reset the object types list for replication in the source account:

ALTER REPLICATION GROUP myrg SET
  OBJECT_TYPES = DATABASES, SHARES;

Copy

Add database db1 to the list of databases enabled for replication:

ALTER REPLICATION GROUP myrg
  ADD db1 to ALLOWED_DATABASES;

Copy

Add share s2 to the list of shares enabled for replication:

ALTER REPLICATION GROUP myrg
  ADD s2 TO ALLOWED_SHARES;

Copy

Move database db1 to another replication group, myrg2:

ALTER REPLICATION GROUP myrg
  MOVE DATABASES db1 TO REPLICATION GROUP myrg2;

Copy

Set the scheduled refresh interval time to 15 minutes:

ALTER REPLICATION GROUP myrg SET
  REPLICATION_SCHEDULE = '15 MINUTE';

Copy

Executed from the target account

Refresh objects in the replication group myrg in the target account:

ALTER REPLICATION GROUP myrg REFRESH;

Copy

Suspend automatic refreshes:

ALTER REPLICATION GROUP myrg SUSPEND;

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4