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 ';