View Oracle user permissions

Source: Internet
Author: User

The types of Oracle Data Dictionary views are user, all, and DBA. (here, * Can be tables, indexes, objects, and users .)

    • User _ *: Information about objects owned by users, that is, information about objects created by users
    • All _ *: Information about objects that can be accessed by users, that is, information about objects created by users plus objects created by other users, which can be accessed by users.
    • DBA _ *: Information about objects in the entire database

View All Users

 
1 Select * FromDba_users;2 3 Select * FromAll_users;4 5 Select * FromUser_users;

View User System Permissions

 
1 Select * FromDba_sys_privs;2 3 Select * FromAll_sys_privs;4 5 Select * FromUser_sys_privs;

View All permissions of a user

 1   Select Privilege From Dba_sys_privsWhere Grantee =  '  HR  '  2   Union  3   Select Privilege From  Dba_sys_privs  4   Where Grantee In ( Select Granted_role From Dba_role_privs Where Grantee =  '  HR  ' );

View user object permissions

1 Select * FromDba_tab_privs;2 3 Select * FromAll_tab_privs;4 5 Select * FromUser_tab_privs;

View All roles

 
1 Select * FromDba_roles;

View roles owned by a user

1 Select * FromDba_role_privs;2 3 Select * FromUser_role_privs;

View the default tablespace of the current user

 
1 SelectUsername, default_tablespaceFromUser_users;

View permissions of a role (Resource)

  1   select   *   from  dba_sys_privs  where  grantee =  '  resource   '; 

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.