How to see what privileges are granted to schema of another user

后端 未结 3 378
无人及你
无人及你 2021-01-31 18:18

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

3条回答
  •  后悔当初
    2021-01-31 18:35

    Use example with from the post of Szilágyi Donát.

    I use two querys, one to know what roles I have, excluding connect grant:

    SELECT * FROM USER_ROLE_PRIVS WHERE GRANTED_ROLE != 'CONNECT'; -- Roles of the actual Oracle Schema

    Know I like to find what privileges/roles my schema/user have; examples of my roles ROLE_VIEW_PAYMENTS & ROLE_OPS_CUSTOMERS. But to find the tables/objecst of an specific role I used:

    SELECT * FROM ALL_TAB_PRIVS WHERE GRANTEE='ROLE_OPS_CUSTOMERS'; -- Objects granted at role.

    The owner schema for this example could be PRD_CUSTOMERS_OWNER (or the role/schema inself).

    Regards.

提交回复
热议问题