How can I export and import Oracle APEX 24.1 Applications and Pages from source Workspace to Destination Workspace having different IDs, Aliases?
Doing export/import from within APEX should handle this without any issues.
If you are doing via the command line, you might see something like
SQL> @f100.sql
APPLICATION 100
Set Credentials...
Check Compatibility...
Set Application ID...
begin
*
ERROR at line 1:
ORA-20001: Package variable g_security_group_id must be set.
ORA-06512: at "APEX_240100.WWV_FLOW_API", line 73
ORA-06512: at "APEX_240100.WWV_FLOW_API", line 342
ORA-06512: at line 4
To resolve this, you need to set your environment correctly and also generate an offset to avoid ID collisions
declare
v_workspace_id NUMBER;
begin
select workspace_id into v_workspace_id
from apex_workspaces where workspace = 'MYWORKSPACE';
apex_application_install.set_workspace_id (v_workspace_id);
apex_util.set_security_group_id
(p_security_group_id => apex_application_install.get_workspace_id);
apex_application_install.set_schema('MYSCHEMA');
apex_application_install.set_application_id(999);
apex_application_install.generate_offset;
apex_application_install.set_application_alias('MYNEWALIAS');
end;
/