HOME BLOG

Archive for November, 2022

How to view what tables a user has privileges on in Oracle

Posted on: November 10th, 2022 by Olu No Comments

Hi folks,

In this post I talk about handy commands you can run to find out what tables a user has privileges on in an Oracle database.

To view privileges for all users, run the following query:

select * from dba_tab_privs;

 

To view privileges for the currently logged-in user, run the following query:

select * from role_tab_privs;

 

The result will show the role, owner, table name, column name, privilege, grantable and common fields for each privilege.

The above command could be very useful when debugging permissions issues.

That’s all for now. Till next time, happy software development.