Couldn't find user

I tried this

grant execute on sys.dbms_crypto to "DB_Project";

But error: ORA-00942: table or view does not exist 00942. 00000 - "table or view does not exist"

Also tried this:

grant execute on sys.dbms_crypto to SYSTEM."DB_Project"; 

ERROR: 00000 - "SQL command not properly ended"

How to solve???

  • Which user have you used to login and grant the privilege? Just login 'sys as sysdba' then perform the action which should succeed.
    – atokpas
    Mar 17, 2019 at 9:49
  • @JSapkota >show user: USER is "SYSTEM" Mar 17, 2019 at 9:59

3 Answers 3


That error is caused by granting a privilege connected as SYSTEM.

If you're connected as SYS, it'll work just fine:

grant execute on dbms_crypto to "DB_Project"; 

(if user is really created using mixed case; otherwise, remove double quotes).


In your first attempt it would appear that the unknown user issuing the command doesn't himself have access sys.dbms_crypto. In the second case, privs are GRANTed to either users or roles. Neither users nor roles are themselves part of some other schema, as suggested by your qualification of "DB_Project" with the schema SYSTEM is invalid syntax for a GRANT.

Also beware that you have enclosed "DB_Project" in double-quotes. This will force case sensitivity on the name, which is a Very Bad Practice in oracle. If you create an object name enclosed in double-quotes, you will always and forever have to refer to in in double quotes and the exact case in which it was created. Create the name without double-quotes and it will be case INsensitve .. you will always be able to refere to it in any case you want, as long as you do not enclose it in double-quotes.


Do you able to see DBMS_CRYPTO?

select * from dba_objects
where object_name = 'DBMS_CRYPTO'

Run following query from SYS or SYSTEM

grant execute on dbms_crypto to "DB_Project";

Temporary, you can ask DBA to provide privilege to confirm, whether you can access the package.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.