GRANTS_TO_USERS 视图¶
此 Account Usage 视图可用于查询已向用户授予的角色。
列¶
列名称 |
数据类型 |
描述 |
---|---|---|
CREATED_ON |
TIMESTAMP_LTZ |
授予角色的时间和日期(采用 UTC 时区)。 |
DELETED_ON |
TIMESTAMP_LTZ |
撤消角色的时间和日期(采用 UTC 时区)。 |
ROLE |
VARCHAR |
向用户授予的角色的标识符。 |
GRANTED_TO |
VARCHAR |
对于此视图,值为 |
GRANTEE_NAME |
VARCHAR |
被授予权限的用户的名称。 |
GRANTED_BY |
VARCHAR |
为其授予权限的角色的标识符。 |
使用说明¶
视图的延迟时间最长可达 120 分钟(2 小时)。
The GRANTS_TO_USERS view does not include grants of privileges and non-account roles to users. For that information, see the GRANTS_TO_ROLES 视图.
This view records current grants and historical grants, including grants that were revoked and granted again. When a single grant occurs and as long as it remains active (that is, not revoked):
该视图包括一行,用于向同一用户授权相同的角色。
向同一用户重新授予相同角色不会记录为新行。相反,当授权处于活动状态时,DELETED_ON 列仍为 NULL。
撤消对用户的授权时,授权的 DELETED_ON 列将从 NULL 更新为授权撤消时的时间戳。
撤消授予用户的角色后,向同一用户授予相同角色不会在新行中记录。在此新行中,DELETED_ON 列值为 NULL,因为授权现在处于活动状态。