SHOW REPLICATION GROUPS

Displays information about replication groups and failover groups.

  • 列出此账户中的每个主要复制组或次要复制组或故障转移组。
  • 列出其他账户中已针对复制到此账户启用的主复制组和故障转移组。
  • 列出其他账户中链接到此账户中的组的辅助复制组和故障转移组。
See also:

CREATE REPLICATION GROUP , ALTER REPLICATION GROUP , DROP REPLICATION GROUP

语法

SHOW REPLICATION GROUPS [ IN ACCOUNT <account> ]

参数

account

指定账户的标识符。

输出

该命令返回以下列:

ColumnDescription
region_group

Region group where the account is located. Note: this column is only visible to organizations that span multiple Region groups.

snowflake_region

账户所在的 Snowflake 区域。Snowflake 区域是云平台区域内与其他 Snowflake 区域隔离的独特位置。Snowflake 区域可以是多租户或单租户(对于 Virtual Private Snowflake 账户)。

created_onDate and time replication or failover group was created.
account_nameName of the account.
nameName of the replication or failover group.
typeType of group. Valid values are REPLICATION or FAILOVER.
commentComment string.
is_primaryIndicates whether the replication or failover group is the primary group.
primaryName of the primary group.
object_typesList of specified object types enabled for replication (and failover in the case of a FAILOVER group).
allowed_integration_types

为复制启用的集成类型列表。

Snowflake always includes this column in the output even if integrations were not specified in the CREATE <object> or ALTER <object> command.

allowed_accountsList of accounts enabled for replication and failover.
organization_nameName of your Snowflake organization.
account_locatorAccount locator in a region.
replication_scheduleScheduled interval for refresh; NULL if no replication schedule is set.
secondary_stateCurrent state of scheduled refresh. Valid values are started or suspended. NULL if no replication schedule is set.
next_scheduled_refreshDate and time of the next scheduled refresh.
owner

对复制组或故障转移组具有 OWNERSHIP 权限的角色名称。如果复制组或故障转移组位于不同的区域,则为 NULL。

is_listing_auto_fulfillment_group

TRUE if the replication group is used for Cross-Cloud Auto-Fulfillment. FALSE otherwise.

使用说明

  • Executing this command requires a role with any one of the following privileges on a replication group:

    • MONITOR
    • OWNERSHIP
    • REPLICATE
  • The output of SHOW REPLICATION GROUPS includes groups of types FAILOVER and REPLICATION.

  • The command doesn’t require a running warehouse to execute.
  • The command only returns objects for which the current user’s current role has been granted at least one access privilege.
  • The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.
  • To post-process the output of this command, you can use the pipe operator (->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.

    For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.

    When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column type, specify SELECT "type".

    You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.

示例

List replication groups in myaccount1:

SHOW REPLICATION GROUPS IN ACCOUNT myaccount1;

+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+---------+-----------------------------------+
| snowflake_region | created_on                    | account_name | name | type     | comment | is_primary | primary               | object_types                                | allowed_integration_types | allowed_accounts                             | organization_name | account_locator   | replication_schedule | secondary_state | next_scheduled_refresh        | owner   | is_listing_auto_fulfillment_group |
+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+---------+-----------------------------------+
| AWS_US_EAST_1    | 2021-10-25 19:08:15.209 -0700 | MYACCOUNT1   | MYFG | FAILOVER |         | true       | MYORG.MYACCOUNT1.MYFG | DATABASES, ROLES, USERS, WAREHOUSES, SHARES |                           | MYORG.MYACCOUNT1.MYFG,MYORG.MYACCOUNT2.MYFG  | MYORG             | MYACCOUNT1LOCATOR | 10 MINUTE            |                 |                               | MYROLE  | false                             |
+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+---------+-----------------------------------+
| AWS_US_WEST_2    | 2021-10-25 19:08:15.209 -0700 | MYACCOUNT2   | MYFG | FAILOVER |         | false      | MYORG.MYACCOUNT1.MYFG |                                             |                           |                                              | MYORG             | MYACCOUNT2LOCATOR | 10 MINUTE            | STARTED         | 2022-03-06 12:10:35.280 -0800 | NULL    | false                             |
+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+---------+-----------------------------------+