Skip to Main Content
  • Questions
  • Is STANDARD_HASH or DBMS_CRYPTO disabled for Always Free Autonomous Oracle Cloud

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: December 02, 2025 - 5:18 am UTC

Last updated: December 08, 2025 - 9:18 am UTC

Version: Always Free Autonomous Oracle Cloud

Viewed 1000+ times

You Asked

With Always Free, there is no support. How do I get DBMS_CRYPTO grant? I tried using STANDARD_HASH, but it says STANDARD_HASH must be declared. So is there a way to get this access preferably to DBMS_CRYPTO? If not is there an alternative?

and Connor said...

They both work for me on my free instance

SQL*Plus: Release 23.0.0.0.0 - Production on Tue Dec 2 13:40:00 2025
Version 23.9.0.25.07

Copyright (c) 1982, 2025, Oracle.  All rights reserved.

Last Successful login time: Tue Dec 02 2025 01:02:20 +08:00

Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.1.0 - for Oracle Cloud and Engineered Systems
Version 23.26.0.1.0

SQL> select standard_hash('qweqwe');

STANDARD_HASH('QWEQWE')
----------------------------------------
F4542DB9BA30F7958AE42C113DD87AD21FB2EDDB

SQL> select dbms_crypto.randomnumber;

RANDOMNUMBER
------------
  1.1654E+38


Rating

  (2 ratings)

Comments

dbms_crypto gives error

Alex, December 03, 2025 - 12:30 pm UTC

select dbms_crypto.randomnumber from dual;


gives me:

Error at line 1/8: ORA-00904: "DBMS_CRYPTO"."RANDOMNUMBER": invalid identifier

However, after some troubleshooting I tried STANDARD_HASH in a query and it works. Previously I was using it as an assignment.

This does not work:
 v_secret_hash := STANDARD_HASH(p_api_secret, 'SHA256'); 


This works:
SELECT STANDARD_HASH(p_api_secret, 'SHA256') INTO v_secret_hash FROM DUAL;


I tried both assignment and select statement with DBMS_CRYPTO and it does not work. I guess it is not allowed to be used on always free? Perhaps it works for you because you're at Oracle? Also I'm wondering if I should upgrade to Oracle 26ai because I'm currently on 19c. Anyways, if you could ask around and give me some insights or better still if you have anyone who can help give me access I'd appreciate it! ;-)

Have a good day and bless you for taking time to answer my question!
Connor McDonald
December 05, 2025 - 5:37 am UTC

Hmmm.,.... no issues with 19c either for me

(This is autonomous)

SQL> select standard_hash('qweqwe') from dual;

STANDARD_HASH('QWEQWE')
----------------------------------------
F4542DB9BA30F7958AE42C113DD87AD21FB2EDDB

SQL> select dbms_crypto.randomnumber from dual;

RANDOMNUMBER
------------
  2.3354E+38

SQL> @ver

BANNER_FULL
--------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.29.0.1.0


Anyway I can get access?

Alex, December 08, 2025 - 12:15 am UTC

STANDARD_HASH works for me. Is there a way for anyone at Oracle to give me access to DBMS_CRYPTO?

I tried your sql statement in your response in SQL Commands and it gives me the same error. Tried with SYS.DBMS_CRYPTO also to see if prefixing with schema works. What should one do when Always Free does not work as expected? I know there is no support available, but is there any forum where I can contact someone for help?
Connor McDonald
December 08, 2025 - 9:18 am UTC

More to Explore

DBMS_CRYPTO

More on PL/SQL routine DBMS_CRYPTO here