6

I am using dbms_crypto.encrypt function in my oracle procedure for encryption of passwords. I have connected to oracle as :

connect sqlplus as sysdba

and then granted permission as :

grant execute on sys.dbms_crypto to myuser;

And then i can use dbms_crypto in my procedure. But i would like to know how can i check in my database whether the permission are granted or not for dbms_crypto ? Because i have to use this procedure in another database and does not know whether that database has grant permission or not for dbms_crypto.

Andrew
  • 3,632
  • 24
  • 64
  • 113

1 Answers1

8

You can get all the privileges on DBMS_CRYPTO with this:

select *
from dba_tab_privs
where table_name = 'DBMS_CRYPTO'
  and owner = 'SYS';

The result in your image says that USER_ABCD has the privilege to execute the package SYS.DBMS_CRYPTO, and this privilege has been given by SYS user.

Aleksej
  • 22,443
  • 5
  • 33
  • 38
  • please check my question i am getting the output as given in diagram. What does it mean ? Does it mean USER_ABCD has permission for dbms_crypto ? – Andrew Apr 29 '16 at 12:49
  • ok and Does oracle have dbms_crypto grant permission by default when it is installed ? – Andrew Apr 29 '16 at 12:53