oracle 授予 dbms_crypto 权限

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36938531/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 01:05:00  来源:igfitidea点击:

grant permission for dbms_crypto

oraclepermissionsgrantsysdbadbms-crypto

提问by Andrew

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

我在我的 oracle 过程中使用 dbms_crypto.encrypt 函数来加密密码。我已连接到 oracle 为:

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.

然后我可以在我的程序中使用 dbms_crypto。但我想知道如何检查我的数据库是否授予 dbms_crypto 权限?因为我必须在另一个数据库中使用此过程,并且不知道该数据库是否具有 dbms_crypto 的授予权限。

回答by Aleksej

You can get all the privileges on DBMS_CRYPTOwith this:

您可以通过以下方式获得所有特权DBMS_CRYPTO

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

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

您图像中的结果表示USER_ABCD具有执行包的权限SYS.DBMS_CRYPTO,并且该权限已由SYS用户授予。