Skip to Main Content

Breadcrumb

XMAS_TREE

The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments, but we might still sneak in a few Office Hours sessions! Thanks for being a member of the AskTOM community.

Question and Answer

Connor McDonald

Thanks for the question, Aman.

Asked: November 12, 2024 - 1:56 pm UTC

Last updated: December 04, 2024 - 5:32 am UTC

Version: 21c

Viewed 100+ times

You Asked

How can I export and import Oracle APEX 24.1 Applications and Pages from source Workspace to Destination Workspace having different IDs, Aliases?

and Connor said...

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;
 /



We're not taking comments currently, so please try again later if you want to add a comment.

More to Explore

Security

All of the vital components for a secure database are covered in the Security guide.