Sep 28, 2018

PLS-00201: identifier 'DBMS_CRYPTO' must be declared issue - Fix

I received below message from my blog message:

I am trying to create following DECRYPT function but it failed with below error. How I can fix it?

e.g.,
CREATE OR REPLACE EDITIONABLE FUNCTION "SCOTT"."DECRYPT_CHAR" (input IN RAW, key IN VARCHAR)
RETURN VARCHAR PARALLEL_ENABLE
IS

.....

BEGIN

....
END;
/


Warning: Function created with compilation errors.

SQL> show error
Errors for FUNCTION "SCOTT"."DECRYPT_CHAR":

LINE/COL ERROR
-------- -----------------------------------------------------------------
6/19     PL/SQL: Item ignored
6/34     PLS-00201: identifier 'DBMS_CRYPTO' must be declared
17/1     PL/SQL: Statement ignored
17/24    PLS-00201: identifier 'DBMS_CRYPTO' must be declared
SQL> 


Ans:
You need to give access on dbms_crypto to your schema. Here your schema is "scott".
Sure it will work.

e.g.,

SQL>  grant execute on sys.dbms_crypto to SCOTT;

Grant succeeded.


No comments:

Post a Comment

Translate >>