SHOW FAILOVER GROUPS

Lists the primary and secondary failover groups in your account, as well as the failover groups in other accounts that are associated with your account.

对于其他账户:

  • 列出为了复制和故障转移到此账户而启用的主要故障转移组。
  • 列出链接到此账户中的组的辅助故障转移组。
See also:

CREATE FAILOVER GROUP , ALTER FAILOVER GROUP , DROP FAILOVER GROUP

语法

SHOW FAILOVER GROUPS [ IN ACCOUNT <account> ]

参数

account

Specifies the identifier for the account. Account name is a unique identifier within your organization. For more details about account name, see Format 1 (preferred): Account name in your organization.

使用说明

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

    • FAILOVER
    • MONITOR
    • OWNERSHIP
    • REPLICATE
  • The output of SHOW FAILOVER GROUPS only includes groups of type FAILOVER.

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

输出

该命令返回以下列:

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 failover group was created.
account_nameName of the account.
nameName of the failover group.
typeType of group. Valid value is FAILOVER.
commentComment string.
is_primaryIndicates whether the failover group is the primary group.
primaryName of the primary group.
object_typesList of specified object types enabled for replication and failover.
allowed_integration_types

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

即使未在 CREATE FAILOVER GROUP 或 ALTER FAILOVER GROUP 命令中指定集成,Snowflake 也始终在输出中包含此列。

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.
ownerName of the role with the OWNERSHIP privilege on the failover group. NULL if the failover group is in a different region.
is_listing_auto_fulfillment_group

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

示例

List failover groups in account myaccount1.

SHOW FAILOVER 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            | NULL            |                               | 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                             |
+------------------+-------------------------------+--------------+------+----------+---------+------------+-----------------------+---------------------------------------------+---------------------------+----------------------------------------------+-------------------+-------------------+----------------------+-----------------+-------------------------------+------------+-----------------------------------+