Search code examples
databaseoracle-databasedatabase-administrationsql-grant

How to see which column of tables are granted to a user in Oracle


I need to see given a user (grantee) which tables, objects and precisely which columns of those tables that user can use and with which privilege (SELECT, INSERT, ...).

I know that with:

SELECT *
FROM DBA_TAB_PRIVS
WHERE grantee = 'USER'

I can see for this grantee all the tables and with which privilege but I need to know also which columns of those tables and possible in which date this grant was given.


Solution

  • All columns; GRANT affects tables, not columns. If you want to narrow privileges to them, create a VIEW which contains only desired subset of tables' columns.