如何作为普通用户在Oracle中运行dbms_加密函数?
我在Oracle中使用如何作为普通用户在Oracle中运行dbms_加密函数?,oracle,cryptography,database,Oracle,Cryptography,Database,我在Oracle中使用dbms\u crypto.hash()函数时遇到问题 我使用sqlplus作为“sys/passwd作为sysdba”连接到数据库服务器, 然后我安装了dbms\u crypto包: @/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/dbmsobtk.sql @/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/prvtobtk.pl
dbms\u crypto.hash()函数时遇到问题
我使用sqlplus作为“sys/passwd作为sysdba”连接到数据库服务器,
然后我安装了dbms\u crypto
包:
@/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/dbmsobtk.sql
@/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/prvtobtk.plb
Grant execute on dbms_crypto to public;
Grant execute on dbms_sqlhash to public;
Grant execute on dbms_obfuscation_toolkit to public;
Grant execute on dbms_obfuscation_toolkit_ffi to public;
Grant execute on dbms_crypto_ffi to public;
一切看起来都不错,所以我测试了hash()
函数:
SQL> select dbms_crypto.hash(utl_raw.cast_to_raw('zorg'), 3) from dual;
DBMS_CRYPTO.HASH(UTL_RAW.CAST_TO_RAW('ZORG'),3)
--------------------------------------------------------------------------------
60C440F9954CA4744204CDA9CC93567059C1EC82
我以普通用户的身份断开并连接到该数据库,但随后出现错误:
SQL> select dbms_crypto.hash(utl_raw.cast_to_raw('zorg'), 3) from dual;
select dbms_crypto.hash(utl_raw.cast_to_raw('zorg'), 3) from dual
*
ERROR at line 1:
ORA-06521: PL/SQL: Error mapping function
ORA-06512: at "MN.DBMS_CRYPTO_FFI", line 131
ORA-06512: at "MN.DBMS_CRYPTO", line 72
为什么我不能作为普通用户使用此功能?如何允许其他用户使用它
我的工作对象是:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
问题解决了。我创建了一个错误的用户包。正确的方法:
使用以下方式连接:
sqlplus / as sysdba
安装软件包:
@/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/dbmsobtk.sql
@/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/prvtobtk.plb
以普通用户身份连接并使用dbms\u crypto
包中的函数
谢谢你回复Michal。你能指出其他人是否能得到帮助吗?否则你可能想结束这个问题。我想其他人可以得到帮助。