SHOW REPLICATION GROUPS¶
显示有关 复制组和故障转移组 的信息。
列出此账户中的每个主要复制组或次要复制组或故障转移组。
列出其他账户中已针对复制到此账户启用的主复制组和故障转移组。
列出其他账户中链接到此账户中的组的辅助复制组和故障转移组。
语法¶
SHOW REPLICATION GROUPS [ IN ACCOUNT <account> ]
参数¶
account指定账户的标识符。
输出¶
该命令返回以下列:
列 |
描述 |
|---|---|
|
账户所在的区域组。注意:仅对于覆盖多个 区域组 的组织,才会显示此列。 |
|
账户所在的 Snowflake 区域。Snowflake 区域是云平台区域内与其他 Snowflake 区域隔离的独特位置。Snowflake 区域可以是多租户或单租户(对于 Virtual Private Snowflake 账户)。 |
|
复制组或故障转移组的创建日期和时间。 |
|
账户的名称。 |
|
复制组或故障转移组的名称。 |
|
组的类型。有效值为 |
|
注释字符串。 |
|
指示复制组或故障转移组是否为主组。 |
|
主组的名称。 |
|
为复制(如果是 |
|
为复制启用的集成类型列表。 Snowflake 始终在输出中包含此列,即使在 CREATE <object> 或 ALTER <object> 命令中未指定集成时也是如此。 |
|
为复制和故障转移启用的账户的列表。 |
|
Snowflake 组织的名称。 |
|
区域中的账户定位器。 |
|
计划的刷新间隔;如果未设置复制计划,则为 NULL。 |
|
计划刷新的当前状态。有效值为 |
|
下一次计划刷新的日期和时间。 |
|
对复制组或故障转移组具有 OWNERSHIP 权限的角色名称。如果复制组或故障转移组位于不同的区域,则为 NULL。 |
|
TRUE if the replication group is used for Cross-Cloud Auto-Fulfillment. FALSE otherwise. |
使用说明¶
执行此命令需要角色对复制组具有以下 任一 权限:
MONITOR
OWNERSHIP
REPLICATE
SHOW REPLICATION GROUPS 的输出包括
FAILOVER和REPLICATION类型的组。
该命令不需要正在运行的仓库即可执行。
该命令仅返回当前用户的当前角色已获授至少一项访问权限的对象。
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 |
+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+---------+-----------------------------------+