Oracle 视图 ROLE_TAB_PRIVS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图ROLE_TAB_PRIVS显示角色授予表的特定权限。它提供的信息可以作为授予或撤销特定角色的表权限的依据。

该视图定义如下:

GRANTED_ROLE |OWNER |TABLE_NAME |GRANTEE |PRIVILEGE |GRANTABLE
—————-|—————|—————|——–|———-|———
PUBLIC |SCHEMA_NAME |TABLE_NAME |ROLE |SELECT |YES

该视图在USAGE:中被列为描述外部角色授权到表中的信息。下面是用户如何查看被给定角色授予的表权限的四个步骤:

1. 使用 “SELECT ROLE FROM DBA_ROLES” 来检索授予角色。

2. 使用 “SELECT TABLE_NAME,PRIVILEGE FROM ROLE_TAB_PRIVS WHERE GRANTEE=” 来检索被给定角色授予的表权限情况。

3. 使用 “SELECT * FROM TABLE_NAME”来检查被给定角色授予哪些表动作的权限。

4. 使用 “REVOKE ON

FROM ; “来撤销授予的表权限。

官方英文解释

ROLE_TAB_PRIVS describes table privileges granted to roles. Information is provided only about roles to which the user has access.

Column Datatype NULL Description

ROLE

VARCHAR2(128)

Name of the role

OWNER

VARCHAR2(128)

Owner of the object

TABLE_NAME

VARCHAR2(128)

Name of the object

COLUMN_NAME

VARCHAR2(128)

Name of the column, if applicable

PRIVILEGE

VARCHAR2(40)

Object privilege granted to the role

GRANTABLE

VARCHAR2(3)

YES if the role was granted with ADMIN OPTION; otherwise NO

COMMON

VARCHAR2(3)

Indicates how the grant was made. Possible values:

  • YES if the privilege was granted commonly (CONTAINER=ALL was used)

  • NO if the privilege was granted locally (CONTAINER=ALL was not used)

INHERITED

VARCHAR2(3)

Indicates whether the role grant was inherited from another container (YES) or not (NO)



数据运维技术 » Oracle 视图 ROLE_TAB_PRIVS 官方解释,作用,如何使用详细说明