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

本站中文解释

Oracle V$ENABLEDPRIVS是Oracle数据库中启用的系统权限所对应的视图。它是只读的并没有提供删除或更新数据的操作,只能查看当前登陆者有哪些权限可以使用。

V$ENABLEDPRIVS的常见用法有:

1、检查当前某用户启用的权限:

SELECT * FROM V$ENABLEDPRIVS WHERE GRANTEE=’CURRENT_USER’;

2、查看当前数据库中拥有最高系统权限的用户:

SELECT GRANTEE, MAX(PRIVILEGE)
FROM V$ENABLEDPRIVS
GROUP BY GRANTEE
HAVING MAX(PRIVILEGE) = ‘SELECT ANY TABLE’;

官方英文解释

V$ENABLEDPRIVS displays the system privileges that have been granted to the current user directly or through the currently enabled roles.

Column Datatype Description

PRIV_NUMBER

NUMBER

Numeric identifier of the system privilege

The matching privilege name for each PRIV_NUMBER can be found in the table SYSTEM_PRIVILEGE_MAP.

SCOPE

VARCHAR2(11)

Indicates the scope with which a privilege was granted. Possible values:

  • COMMON

  • APPLICATION

  • LOCAL

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

See Also:

“SYSTEM_PRIVILEGE_MAP”


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