Skip to Main Content
  • Questions
  • SqlCLI Apex Export not included Application Audit Informations

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Szlanyinka.

Asked: July 03, 2024 - 5:19 am UTC

Last updated: July 05, 2024 - 1:57 pm UTC

Version: 24.1

Viewed 1000+ times

You Asked

Hi!

We have a lot of Apex apps, so we check the LAST_UPDATED_ON value in both the production and dev apps before deploying to production.

Like this:

select
 d.APPLICATION_ID
, d.APPLICATION_NAME
, d.ALIAS
, d.OWNER DEV_OWNER
, p.OWNER PERP01_OWNER
, d.LAST_UPDATED_ON DEV
, p.LAST_UPDATED_ON PERP01
, case
 when d.LAST_UPDATED_ON < p.LAST_UPDATED_ON then 'PROD'
 when d.LAST_UPDATED_ON > p.LAST_UPDATED_ON then 'DEV'
 else null
 end LAST
from apex_240100.APEX_APPLICATIONS@DEV d
 left outer join apex_240100.APEX_APPLICATIONS@PROD p on
 p.workspace = d.workspace
 and p.application_id = d.application_id
where d.WORKSPACE = 'WS'
order by d.LAST_UPDATED_ON desc;


After the 24.1 installation, in the case of applications exported with SQLCLI, if the application is imported into the production environment, the values ​​of LAST_UPDATED_ON and LAST_UPDATED_BY will be empty.

Any suggestions?

and Connor said...

This is a new feature in APEX 24.1

APEX24EXPORT

This was a new feature added in 24.1 that allows developers to include/exclude the created/modified dates and names. Names can be excluded if personal info is not wanted in the source code. Dates can be excluded so that CI/CD data does not have false positives if only a date was changed (e.g. modified a page and then reverted the changes).

Rating

  (2 ratings)

Comments

apex export -workspaceId

Szlanyinka Zoltán, July 05, 2024 - 2:05 pm UTC

Thanks for the answer, but the problem does not occur in Apex Builder, but in SQLCLI apex export:

apex export -workspaceId 1192094510004232 -skipexportdate false -dir dev_etalon;

SQLcl 24.1 does not provide for the Audit Info in apex export

Peter Burgess, July 10, 2024 - 7:03 am UTC

Hi Connor,

We are also having issues exporting apps with SQLcl, since upgrading to APEX 24.1

I've just given the latest version of SQLcl 24.1 a try, but it does not seem to support the new export options yet.

This document suggests that the API does support the export of Audit Info.

https://docs.oracle.com/en/database/oracle/apex/24.1/aeapi/GET_APPLICATION_Function.html#GUID-A8E626D6-D7DE-4E59-8F90-3666A7A41A87

APEX_EXPORT.GET_APPLICATION (
p_application_id IN NUMBER,
p_type IN t_export_type DEFAULT c_type_application_source,
p_split IN BOOLEAN DEFAULT FALSE,
p_with_date IN BOOLEAN DEFAULT FALSE,
p_with_ir_public_reports IN BOOLEAN DEFAULT FALSE,
p_with_ir_private_reports IN BOOLEAN DEFAULT FALSE,
p_with_ir_notifications IN BOOLEAN DEFAULT FALSE,
p_with_translations IN BOOLEAN DEFAULT FALSE,
p_with_pkg_app_mapping IN BOOLEAN DEFAULT FALSE,
p_with_original_ids IN BOOLEAN DEFAULT FALSE,
p_with_no_subscriptions IN BOOLEAN DEFAULT FALSE,
p_with_comments IN BOOLEAN DEFAULT FALSE,
p_with_supporting_objects IN VARCHAR2 DEFAULT NULL,
p_with_acl_assignments IN BOOLEAN DEFAULT FALSE,
p_components IN apex_t_varchar2 DEFAULT NULL,
p_with_audit_info IN t_audit_type DEFAULT NULL )
RETURN apex_t_export_files;

May I request a new version of SQLcl to cover this option?

Thanks
Peter.