SHOW MANAGED ACCOUNTS

列出为您的账户创建的托管账户。目前由数据提供商用于为其使用者创建读者账户。有关更多详细信息,请参阅 管理阅读者账户

另请参阅:

CREATE MANAGED ACCOUNTDROP MANAGED ACCOUNT

语法

SHOW MANAGED ACCOUNTS [ LIKE '<pattern>' ]
Copy

参数

LIKE 'pattern'

(可选)按对象名称筛选命令输出。筛选器使用 不区分大小写 的模式匹配,并支持 SQL 通配符(%_)。

例如,以下模式返回 相同的 结果:

... LIKE '%testing%' ...
... LIKE '%TESTING%' ...

. 默认:无值(不对输出应用筛选)。

使用说明

  • 该命令可以由具有 ACCOUNTADMIN 角色(或已授予 MONITOR USAGE 全局权限的角色)的用户执行。

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

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

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

  • 该命令 最多 返回指定对象类型的 1 万条记录,由用于执行命令的角色的访问权限决定。即使应用了筛选器,也不会返回任何超出 1 万条限制后的记录。

    要查看存在超过 1 万条记录的结果,请在 Snowflake Information Schema 中查询相应的视图(如果存在)。

输出

命令输出在以下列中提供托管账户属性和元数据:

描述

account_name

账户的名称。

cloud

托管账户所在的云。对于阅读者账户,这始终与提供商账户的云相同。

region

托管账户所在的区域。对于阅读者账户,这始终与提供商账户的区域相同。

account_locator

账户的旧版标识符。

created_on

创建托管账户的日期和时间。

account_url

用于连接到账户的 账户 URL,采用账户名称格式。此格式的 账户标识符 遵循模式 <orgname>-<account_name>

account_locator_url

用于连接到账户的账户 URL,采用旧版账户定位器格式。

is_reader

指定托管账户是否为阅读者账户(用于共享数据)。

comment

为托管账户添加注释。

region_group

托管账户所在的区域组。

old_account_url

如果重命名账户时保存了原始 账户 URL,则提供原始 URL。如果删除了原始账户 URL,则即使账户已重命名,该值也为 NULL。

account_old_url_saved_on

如果重命名账户时保存了原始账户 URL,则提供保存原始账户 URL 的日期和时间。

account_old_url_last_used

如果账户重命名时保存了原始账户 URL,则指示上次使用原始 URL 访问该账户的时间。

organization_old_url

如果以创建新 账户 URL 的方式更改了账户的组织,并且保存了原始账户 URL,则提供原始账户 URL。如果删除了原始账户 URL,则即使组织已更改,该值也是 NULL。

organization_old_url_saved_on

如果以创建新账户 URL 的方式更改了账户的组织,并且保存了原始账户 URL,则提供保存原始账户 URL 的日期和时间。

organization_old_url_last_used

如果以创建新账户 URL 的方式更改了账户的组织,并且保存了原始账户 URL,则指示上次使用原始账户 URL 访问账户的时间。

示例

SHOW MANAGED ACCOUNTS;
Copy
+--------------+-------+-----------+---------+-------------------------------+--------------------------------------------+----------------------------------------+-----------+---------+----------------+
| name         | cloud | region    | locator | created_on                    | url                                        |  account_locator_url                   | is_reader | comment |  region_group  |
|--------------+-------+-----------+---------+-------------------------------+--------------------------------------------+----------------------------------------+-----------+---------|----------------|
| ACCT1        | aws   | us-west-2 | RE47190 | 2018-05-30 14:38:54.479 -0700 | https://bazco-acct1.snowflakecomputing.cn  |  https://re47190.snowflakecomputing.cn | true    |         |     PUBLIC     |
+--------------+-------+-----------+---------+-------------------------------+--------------------------------------------+----------------------------------------+-----------+---------+----------------+
语言: 中文