Oracle权限(二)权限相关的动态性能视图与数据字典视图

简介: 001 DBA_USERS DBA_USERS 描述了数据库中所有的用户信息。 相关视图: USER_USERS 描述了当前用户的信息。

001 DBA_USERS

DBA_USERS 描述了数据库中所有的用户信息。

相关视图:

USER_USERS 描述了当前用户的信息。该视图不包括 PASSWORDPROFILEPASSWORD_VERSIONSEDITIONS_ENABLED, 和AUTHENTICATION_TYPE 列.

Column Description
USERNAME 用户名
USER_ID 用户ID
PASSWORD 为了支持AUTHENTICATION_TYPE 列,该列已被弃用
ACCOUNT_STATUS 帐号(用户)状态,一共9种:
  • OPEN

  • EXPIRED

  • EXPIRED(GRACE)

  • LOCKED(TIMED)

  • LOCKED

  • EXPIRED & LOCKED(TIMED)

  • EXPIRED(GRACE) & LOCKED(TIMED)

  • EXPIRED & LOCKED

  • EXPIRED(GRACE) & LOCKED

LOCK_DATE 帐号被锁定的日期(如果帐号处于锁定状态)
EXPIRY_DATE 帐号过期的日期
DEFAULT_TABLESPACE 数据的默认表空间
TEMPORARY_TABLESPACE 默认的临时表空间名或临时表空间组名
CREATED 用户创建日期
PROFILE 用户资源概要文件名
INITIAL_RSRC_CONSUMER_GROUP 用户的初始资源消费者组
EXTERNAL_NAME 用户外部名
PASSWORD_VERSIONS Shows the list of versions of the password hashes (also known as "verifiers") existing for the account.

The PASSWORD_VERSIONS column value includes 10G if an old case-insensitive ORCL hash exists and 11G if a SHA-1 hash exists.

Note that one or both of these verifiers can exist for any given account.

EDITIONS_ENABLED Indicates whether editions have been enabled for the corresponding user (Y) or not (N)
AUTHENTICATION_TYPE Indicates the authentication mechanism for the user:
  • EXTERNAL - CREATE USER user1 IDENTIFIED EXTERNALLY;

  • GLOBAL - CREATE USER user2 IDENTIFIED GLOBALLY;

  • PASSWORD - CREATE USER user3 IDENTIFIED BY user3;


002 DBA_SYS_PRIVS

DBA_SYS_PRIVS 描述了授予给用户和角色的系统权限。

Column Description
GRANTEE Grantee name, user, or role receiving the grant
PRIVILEGE System privilege
ADMIN_OPTION Indicates whether the grant was with the ADMIN option (YES) or not (NO)

003  ROLE_ROLE_PRIVS

ROLE_ROLE_PRIVS describes the roles granted to other roles. Information is provided only about roles to which the user has access.

Column Description
ROLE Name of the role
GRANTED_ROLE Role that was granted
ADMIN_OPTION Signifies that the role was granted with ADMIN option


004 ROLE_SYS_PRIVS

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

Column Description
ROLE Name of the role
PRIVILEGE System privilege granted to the role
ADMIN_OPTION Indicates whether the grant was with the ADMIN option (YES) or not (NO)


005 ROLE_TAB_PRIVS

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

Column Description
ROLE Name of the role
OWNER Owner of the object
TABLE_NAME Name of the object
COLUMN_NAME Name of the column, if applicable
PRIVILEGE Object privilege granted to the role
GRANTABLE YES if the role was granted with ADMIN OPTION; otherwise NO

 

006 DBA_TAB_PRIVS

DBA_TAB_PRIVS describes all object grants in the database.

Related View

USER_TAB_PRIVS describes the object grants for which the current user is the object owner, grantor, or grantee.

Column Description
GRANTEE Name of the user or role to whom access was granted
OWNER Owner of the object
TABLE_NAME Name of the object. The object can be any object, including tables, packages, indexes, sequences, and so on.
GRANTOR Name of the user who performed the grant
PRIVILEGE Privilege on the object
GRANTABLE Indicates whether the privilege was granted with the GRANT OPTION(YES) or not (NO)
HIERARCHY Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)


007 DBA_COL_PRIVS

DBA_COL_PRIVS describes all column object grants in the database.

Related View

USER_COL_PRIVS describes the column object grants for which the current user is the object owner, grantor, or grantee.

Column Description
GRANTEE Name of the user or role to whom access was granted
OWNER Owner of the object
TABLE_NAME Name of the object
COLUMN_NAME Name of the column
GRANTOR Name of the user who performed the grant
PRIVILEGE Privilege on the column
GRANTABLE Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)


008 DBA_ROLES

DBA_ROLES describes all roles in the database.

Column Description
ROLE Name of the role
PASSWORD_REQUIRED This column is deprecated in favor of the AUTHENTICATION_TYPEcolumn
AUTHENTICATION_TYPE Indicates the authentication mechanism for the role:
  • NONE - CREATE ROLE role1;

  • EXTERNAL - CREATE ROLE role2 IDENTIFIED EXTERNALLY;

  • GLOBAL - CREATE ROLE role3 IDENTIFIED GLOBALLY;

  • APPLICATION - CREATE ROLE role4 IDENTIFIED USINGschema.package;

  • PASSWORD - CREATE ROLE role5 IDENTIFIED BY role5;


009 DBA_ROLE_PRIVS

DBA_ROLE_PRIVS describes the roles granted to all users and roles in the database.

Related View

USER_ROLE_PRIVS describes the roles granted to the current user.

Column Description
GRANTEE Name of the user or role receiving the grant
GRANTED_ROLE Granted role name
ADMIN_OPTION Indicates whether the grant was with the ADMIN OPTION (YES) or not (NO)
DEFAULT_ROLE Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO)


010 V$PWFILE_USERS

V$PWFILE_USERS lists all users in the password file, and indicates whether the user has been granted the SYSDBASYSOPER, and SYSASM privileges.

Column Description
USERNAME Name of the user that is contained in the password file
SYSDBA Indicates whether the user can connect with SYSDBA privileges (TRUE) or not (FALSE)
SYSOPER Indicates whether the user can connect with SYSOPER privileges (TRUE) or not (FALSE)
SYSASM Indicates whether the user can connect with SYSASM privileges (TRUE) or not (FALSE)



未完待续

相关文章
|
22天前
|
Oracle 关系型数据库 Linux
【YashanDB 知识库】通过 dblink 查询 Oracle 数据时报 YAS-07301 异常
客户在使用 YashanDB 通过 yasql 查询 Oracle 数据时,遇到 `YAS-07301 external module timeout` 异常,导致 dblink 功能无法正常使用,影响所有 YashanDB 版本。原因是操作系统资源紧张,无法 fork 新子进程。解决方法包括释放内存、停掉不必要的进程或增大进程数上限。分析发现异常源于 system() 函数调用失败,返回 -1,通常是因为 fork() 失败。未来 YashanDB 将优化日志信息以更好地诊断类似问题。
|
1天前
|
Oracle 关系型数据库 Linux
【YashanDB知识库】通过dblink查询Oracle数据时报YAS-07301异常
【YashanDB知识库】通过dblink查询Oracle数据时报YAS-07301异常
|
23天前
|
Oracle 关系型数据库 Linux
【YashanDB 知识库】通过 dblink 查询 Oracle 数据时报 YAS-07301 异常
某客户在使用 YashanDB 通过 yasql 查询 Oracle 数据时,遇到 `YAS-07301 external module timeout` 异常,导致 dblink 功能无法正常使用,影响所有版本。问题源于操作系统资源紧张,无法 fork 新子进程。解决方法包括释放内存、停掉不必要的进程或增大进程数上限。分析发现异常原因为系统调用 fork() 失败。经验总结:优化日志记录,提供更多异常信息。
|
2月前
|
SQL Oracle 关系型数据库
如何在 Oracle 中配置和使用 SQL Profiles 来优化查询性能?
在 Oracle 数据库中,SQL Profiles 是优化查询性能的工具,通过提供额外统计信息帮助生成更有效的执行计划。配置和使用步骤包括:1. 启用自动 SQL 调优;2. 手动创建 SQL Profile,涉及收集、执行调优任务、查看报告及应用建议;3. 验证效果;4. 使用 `DBA_SQL_PROFILES` 视图管理 Profile。
|
4月前
|
存储 Oracle 关系型数据库
【赵渝强老师】Oracle的还原数据
Oracle数据库中的还原数据(也称为undo数据或撤销数据)存储在还原表空间中,主要用于支持查询的一致性读取、实现闪回技术和恢复失败的事务。文章通过示例详细介绍了还原数据的工作原理和应用场景。
【赵渝强老师】Oracle的还原数据
|
4月前
|
SQL Oracle 关系型数据库
【赵渝强老师】Oracle的联机重做日志文件与数据写入过程
在Oracle数据库中,联机重做日志文件记录了数据库的变化,用于实例恢复。每个数据库有多组联机重做日志,每组建议至少有两个成员。通过SQL语句可查看日志文件信息。视频讲解和示意图进一步解释了这一过程。
|
4月前
|
SQL Oracle 关系型数据库
【赵渝强老师】Oracle的数据文件
在Oracle数据库中,数据库由多个表空间组成,每个表空间包含多个数据文件。数据文件存储实际的数据库数据。查询时,如果内存中没有所需数据,Oracle会从数据文件中读取并加载到内存。可通过SQL语句查看和管理数据文件。附有视频讲解及示例。
|
5月前
|
SQL Oracle 关系型数据库
Oracle SQL:了解执行计划和性能调优
Oracle SQL:了解执行计划和性能调优
145 1
|
5月前
|
Oracle 关系型数据库 数据库
oracle数据创建同义词
oracle数据创建同义词
77 0
|
Oracle 关系型数据库 数据库
Oracle 11G常见性能诊断报告(AWR/ADDM/ASH)收集
Oracle 11G常见性能诊断报告(AWR/ADDM/ASH)收集
375 0

热门文章

最新文章

推荐镜像

更多