Consider the case : In a database , I have two users A and B and their corresponding schema.
I want to know , How can I get the information : what permissions are there for USER A in Schema B .
Consider the case : We have two users and their associated scehmas. We have user A and user B. In A, say we have TB1 TB2, in B,say we have TBa, TBb. Now I want to know how can I find what privileges User A has on Schema B.
For example : User A is writing : select * from B.TBb This means USER A is accessing User B’s table so , it shows he has SELECT Privilege. I want to know what all privileges User A has on Schema B.
Which query shall be executed to get the list of privileges that User A has on Schema B.
You can use these queries:
Each of these tables have a
granteecolumn, you can filter on that in the where criteria:To query privileges on objects (e.g. tables) in other schema I propose first of all
all_tab_privs, it also has atable_schemacolumn.If you are logged in with the same user whose privileges you want to query, you can use
user_tab_privs,user_sys_privs,user_role_privs. They can be queried by a normal non-dba user.