Search code examples
sqloracle-databasesql-grant

how to find the grant permission for objects from user schema


I have a situation like this. I have schema which has high level user 'db1owner' and low level user 'db1user'.

'db1owner' has grant some permissions to view, table, and other schema objects for 'db1user'.

Now I want to know the list of objects which all grant by 'db1owner' with permission details.

How can find it?

Any help indeed!

Thanks


Solution

  • Take a look at the ALL_TAB_PRIVS data dictionary table.

    Something like....

    SELECT *
    FROM   ALL_TAB_PRIVS
    WHERE  GRANTOR = 'db1owner'
    AND    GRANTEE = 'db1user'
    

    Description of ALL_TAB_PRIVS:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2099.htm