oracle中的角色的所有者是谁?

本文深入探讨了Oracle数据库中的角色管理,包括角色创建、分配和审计的过程。详细解释了角色无所有者特性,以及拥有CREATEROLE或SYSDBA权限的用户如何自动获得角色并能进一步授予其他用户。此外,还介绍了如何通过DBA_ROLE_PRIVS和USER_ROLE_PRIVS视图查询角色分配情况,以及如何使用AUDIT ROLE语句和DBA_AUDIT_TRAIL视图进行角色创建和授权的审计。

准备SQL考试,找了很久,明白了。

The roles in Oracle Database have no owner as well as directories have no owner.

When the user with CREATE ROLE or SYSDBA privilege creates the role, he or she is automatically assigned that role WITH ADMIN OPTION which means that the user can subsequently grant that role to other users even if the privilege CREATE ROLE is revoked from the user.

You can see what roles are assigned to which users querying DBA_ROLE_PRIVS view, or USER_ROLE_PRIVS if you want to know what roles are assigned to the current user.

Also, a user cannot create a role if the role with the same name already exists. However you can audit role creation and granting. You can do that with AUDIT ROLE statement (if it was for some reason disabled with NOAUDIT ROLE), and then querying DBA_AUDIT_TRAIL view.

 

通过下面的sql可以查看

select * from dba_role_privs

select * from user_role_privs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值