22.22 RESERVE_WORKSPACE_APP_IDS Procedure

This procedure permanently reserves the IDs of websheet and database applications in a given workspace. Even if the workspace and its applications get removed, developers can not create other applications with one of these IDs.

Syntax

APEX_INSTANCE_ADMIN.RESERVE_WORKSPACE_APP_IDS (
    p_workspace_id IN NUMBER );

Parameters

Table 22-18 RESERVE_WORKSPACE_APP_IDS Parameters

Parameter Description

p_workspace_id

The unique ID of the workspace.

Example

This example demonstrates setting up two separate Application Express instances where the application IDs are limited to within a specific range. At a later point, a workspace and all of it's applications are moved from instance 1 to instance 2. For the workspace that is moved, the developer reserves all of its application IDs to ensure that no applications with the same IDs are created on instance 1.

  1. After setting up Application Express instance 1, ensure that application IDs are between 100000 and 199999.

    begin
        apex_instance_admin.set_parameter('APPLICATION_ID_MIN', 100000);
        apex_instance_admin.set_parameter('APPLICATION_ID_MAX', 199999);
    end;
    
  2. After setting up Application Express instance 2, ensure that application IDs are between 200000 and 299999.

    begin
        apex_instance_admin.set_parameter('APPLICATION_ID_MIN', 200000);
        apex_instance_admin.set_parameter('APPLICATION_ID_MAX', 299999);
    end;
  3. Later, the operations team decides that workspace MY_WORKSPACE with ID 1234567890 should be moved from instance 1 to instance 2. The required steps are:

    1. Export the workspace, applications and data on instance 1 (not shown here).

    2. Ensure that no other application on instance 1 can reuse application IDs of this workspace.

      begin
          apex_instance_admin.reserve_workspace_app_ids(1234567890);
      end;
    3. Drop workspace, accompanying data and users on instance 1.

      begin
          apex_instance_admin.remove_workspace('MY_WORKSPACE');
      end;
    4. Import the workspace, applications and data on instance 2 (not shown here).

See Also:

To undo a reservation, see "FREE_WORKSPACE_APP_IDS Procedure."