Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Query commands related to Oracle permissions

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains the "Oracle permissions-related query commands", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Oracle permissions-related query commands"!

There are many views related to Oracle permissions. Record the commonly used statements to facilitate the query:

1. View all users:

Select * from dba_users

Select * from all_users

Select * from user_users

two。 View user or role system permissions (system permissions assigned directly to a user or role):

Select * from dba_sys_privs

Select * from user_sys_privs

3. View the permissions contained in roles (you can only view roles owned by logged-in users)

Select * from role_sys_privs where role='DBA'

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 owned by the user or role:

Select * from dba_role_privs

Select * from user_role_privs

7. Check which users have sysdba or sysoper system permissions (appropriate permissions are required for query)

Select * from V$PWFILE_USERS

For example, I want to check the permissions of user XXX:

Select * from dba_sys_privs where grantee='XXX'

GRANTEE PRIVILEGE ADMIN_OPTION

-

XXX CREATE TRIGGER NO

XXX UNLIMITED TABLESPACE NO

For example, I want to check the roles owned by user XXX:

Select * from dba_role_privs where grantee='XXX'

GRANTEE GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE

-

XXX DBA NO YES

View all permissions and roles of a user

Select privilege from dba_sys_privs where grantee='XXX'

Union

Select privilege from dba_sys_privs where grantee in

(select granted_role from dba_role_privs where grantee='XXX')

Thank you for your reading, the above is the content of "Oracle permissions-related query commands". After the study of this article, I believe you have a deeper understanding of the problem of Oracle permissions-related query commands, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report