dbms_crypto.hash()
Oracle での関数の使用に問題があります。
「sys/passwd as sysdba」としてsqlplusを使用してデータベースサーバーに接続し、dbms_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