Oracle View User Role Permissions Statement ____oracle

Source: Internet
Author: User
1. View All Users:
SELECT * from Dba_users;
SELECT * from All_users;
SELECT * from User_users;

2. View user or role system permissions (directly assigned to user or role system permissions): SELECT * from Dba_sys_privs;
SELECT * from User_sys_privs;

3. View the rights included in the role (view only the roles owned by the logged on user)
Sql>select * from Role_sys_privs;

4. View User Object permissions: SELECT * from Dba_tab_privs;
SELECT * from All_tab_privs;
SELECT * from User_tab_privs;

5. View all roles:
SELECT * from Dba_roles;

6. View the roles that a user or role has:
SELECT * from Dba_role_privs;
SELECT * from User_role_privs;

7. See which users have SYSDBA or Sysoper system privileges (requires appropriate permissions when querying)
SELECT * FROM V$pwfile_users

For example, I want to see the permissions that user Scott has:

Sql> SELECT * from Dba_sys_privs where grantee= ' SCOTT ';

GRANTEE Privilege Admin_option
-------- ---------------------- ------------
SCOTT CREATE TRIGGER NO
SCOTT Unlimited tablespace NO

For example, I want to see the roles that user Scott has:

Sql> SELECT * from Dba_role_privs where grantee= ' SCOTT ';


Grantee granted_role admin_option default_role
-------------------------------------------
SCOTT    dba          NO           YES

To view all permissions and roles for a user
Select privilege from Dba_sys_privs where grantee= ' SCOTT '
Union
Select privilege from Dba_sys_privs where grantee in
(select Granted_role from Dba_role_privs where grantee= ' SCOTT ');

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.