SHOW REPLICATION GROUPS

显示有关 复制组和故障转移组 的信息。

  • 列出此账户中的每个主要复制组或次要复制组或故障转移组。

  • 列出其他账户中已针对复制到此账户启用的主复制组和故障转移组。

  • 列出其他账户中链接到此账户中的组的辅助复制组和故障转移组。

另请参阅:

CREATE REPLICATION GROUPALTER REPLICATION GROUPDROP REPLICATION GROUP

语法

SHOW REPLICATION GROUPS [ IN ACCOUNT <account> ]
Copy

参数

account

指定账户的标识符。

输出

该命令返回以下列:

描述

region_group

账户所在的区域组。注意:仅对于覆盖多个 区域组 的组织,才会显示此列。

snowflake_region

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

created_on

复制组或故障转移组的创建日期和时间。

account_name

账户的名称。

name

复制组或故障转移组的名称。

type

组的类型。有效值为 REPLICATIONFAILOVER

comment

注释字符串。

is_primary

指示复制组或故障转移组是否为主组。

primary

主组的名称。

object_types

为复制(如果是 FAILOVER 组,则为故障转移)启用的指定对象类型的列表。

allowed_integration_types

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

Snowflake 始终在输出中包含此列,即使在 CREATE <object> 或 ALTER <object> 命令中未指定集成时也是如此。

allowed_accounts

为复制和故障转移启用的账户的列表。

organization_name

Snowflake 组织的名称。

account_locator

区域中的账户定位器。

replication_schedule

计划的刷新间隔;如果未设置复制计划,则为 NULL。

secondary_state

计划刷新的当前状态。有效值为 startedsuspended。如果未设置复制计划,则为 NULL。

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.

使用说明

  • 执行此命令需要角色对复制组具有以下 任一 权限:

    • MONITOR

    • OWNERSHIP

    • REPLICATE

  • SHOW REPLICATION GROUPS 的输出包括 FAILOVERREPLICATION 类型的组。

  • 该命令不需要正在运行的仓库即可执行。

  • 该命令仅返回当前用户的当前角色已获授至少一项访问权限的对象。

  • MANAGE GRANTS 访问权限隐式允许其持有者查看账户中的每个对象。默认情况下,只有账户管理员(具有 ACCOUNTADMIN 角色的用户)和安全管理员(具有 SECURITYADMIN 角色的用户)才具有 MANAGE GRANTS 权限。

  • 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.

    The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is type, then specify "type" for the identifier.

示例

列出 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                             |
+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+---------+-----------------------------------+
Copy
语言: 中文