Generate APEX application checksum in PL/SQL

In Oracle APEX, generating the application checksum is useful to compare if the application you have running in one workspace is an exact copy of the application running somewhere else.

To create this checksum, you can go into Utilities -> Application Checksum.

However, it is not very well documented how you could generate this checksum using PL/SQL to automatically check it using some code or even implement it via REST.

Here is the solution:

set serverout on
declare
    l_files apex_t_export_files;
begin
   -- Print SH1
    l_files   := apex_export.get_application(p_application_id => 101, p_type => 'CHECKSUM-SH1');
    dbms_output.put_line(l_files(1).contents);
   -- Print SH256
    l_files   := apex_export.get_application(p_application_id => 101, p_type => 'CHECKSUM-SH256');
    dbms_output.put_line(l_files(1).contents);
end;
/

SH1:lGbYh4kq0oKFIA7pi7qJuPi+NsY=
SH256:hGDThkXNl5PrVZCDpRUfq0JoqMI0/njt94ZxQLN7HDA=
Have you enjoyed? Please leave a comment or give a 👍!

Leave a Reply

Your email address will not be published.