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

本站中文解释

Oracle视图DBA_USED_PRIVS用于查看当前系统中的用户已经使用的权限。它显示了从SYS或PUBLIC视图角度看到的用户的凭据和超权。此视图可以用于查找系统使用的某种特定访问功能,以及帮助定位权限的问题的来源。

使用DBA_USED_PRIVS视图的方法:
1. 打开SQL*Plus,连接到数据库。
2. 登录一个特殊用户,例如SYSDBA,并执行以下SQL:
SELECT GRANTEE, GRANTED_ROLE, ADMIN_OPTION, COMMON, AU_NAME
FROM DBA_USED_PRIVS;
3. 上面的查询将打印出当前系统中所有用户已经使用的权限,包括角色、临时角色、公共角色、管理选项等。

官方英文解释

DBA_USED_PRIVS lists the privileges that are used for the privilege analysis policies reported by the DBMS_PRIVILEGE_CAPTURE.GENERATE_RESULT procedure.

This view provides access to analyzed privilege records in SYS tables.

You must have the CAPTURE_ADMIN role to access this view.

Column Datatype NULL Description

CAPTURE

VARCHAR2(128)

NOT NULL

Name of a privilege analysis policy

SEQUENCE

NUMBER

NOT NULL

The sequence number of the privilege analysis run during which the privilege was reported

OS_USER

VARCHAR2(128)

Operating system login username

USERHOST

VARCHAR2(128)

Client host machine name

MODULE

VARCHAR2(64)

Module name

USERNAME

VARCHAR2(128)

NOT NULL

Name of the user whose privilege was reported

USED_ROLE

VARCHAR2(128)

Used role

SYS_PRIV

VARCHAR2(40)

Used system privilege

OBJ_PRIV

VARCHAR2(40)

Used object privilege

USER_PRIV

VARCHAR2(25)

Used user privilege

OBJECT_OWNER

VARCHAR2(128)

Object owner

OBJECT_NAME

VARCHAR2(128)

Name of the object or user that OBJ_PRIV or USER_PRIV is used to access

OBJECT_TYPE

VARCHAR2(23)

Type of the object or user that OBJ_PRIV or USER_PRIV is used to access

COLUMN_NAME

VARCHAR2(128)

Name of the column that OBJ_PRIV is used to access

OPTION$

NUMBER

Indicates whether the GRANT option or the ADMIN option was used:

  • 0 – Indicates that the GRANT option or ADMIN option was not used

  • 1 – Indicates that the GRANT option or ADMIN option was used

PATH

GRANT_PATH

Used privilege grant paths

RUN_NAME

VARCHAR2(128)

The name of the run during which the privilege was reported

See Also:

  • “DBA_UNUSED_PRIVS”

  • Oracle Database Security
    Guide
    for more information about privilege analysis

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_PRIVILEGE_CAPTURE.GENERATE_RESULT procedure


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