I am looking to provide grant to one of my function in my database. However, I am not sure what roles I should give access to.

I searched for it but can't find list of roles for all the users.

Any idea guys as which table I should be looking into.

I am using Oracle 11g.

Thanks in Advance :)

  • your supposed to know what roles you run a function, by definition. Dec 17 '13 at 10:38
  • and how I am supposed to know that... Actually I want to provide grant to another user of the same database... but not sure what roles I should grant access on.
    – akhil
    Dec 17 '13 at 10:39
  • 1
    Be aware that role grants do not work as you think they do when packages and stored procedures are concerned. See Tom explaining asktom.oracle.com/pls/asktom/…
    – Philᵀᴹ
    Dec 17 '13 at 15:52

You can find this information in the DBA_* views in Oracle.

To find all roles in the database:

select * from dba_roles

To find what roles a particular user has:

select * from dba_role_privs where grantee=<user name>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.