Previous |
Next |
Using the workspace FRED_DEV on the development instance, you generate an application export of application 645 and save it as file f645.sql. All examples in this section assume you are connected to SQL*Plus.
Import Application without Modification
To import this application back into the FRED_DEV workspace on the same development instance using the same application ID:
@f645.sql
Import Application with Specified Application ID
To import this application back into the FRED_DEV workspace on the same development instance, but using application ID 702:
begin apex_application_install.set_application_id( 702); apex_application_install.generate_offset; apex_application_install.set_application_alias( 'F' || apex_application.get_application_id ); end; / @645.sql
Import Application with Generated Application ID
To import this application back into the FRED_DEV workspace on the same development instance, but using an available application ID generated by Application Express:
begin apex_application_install.generate_application_id; apex_application_install.generate_offset; apex_application_install.set_application_alias( 'F' || apex_application.get_application_id ); end; / @f645.sql
Import Application into Different Workspace using Different Schema
To import this application into the FRED_PROD workspace on the production instance, using schema FREDDY, and the workspace ID of FRED_DEV and FRED_PROD are different:
declare l_workspace_id number; begin select workspace_id into l_workspace_id from apex_workspaces where workspace = 'FRED_PROD'; -- apex_application_install.set_workspace_id( l_workspace_id ); apex_application_install.generate_offset; apex_application_install.set_schema( 'FREDDY' ); apex_application_install.set_application_alias( 'FREDPROD_APP' ); end; / @f645.sql
Import into Training Instance for Three Different Workspaces
To import this application into the Training instance for 3 different workspaces:
declare l_workspace_id number; begin select workspace_id into l_workspace_id from apex_workspaces where workspace = 'TRAINING1'; -- apex_application_install.set_workspace_id( l_workspace_id ); apex_application_install.generate_application_id; apex_application_install.generate_offset; apex_application_install.set_schema( 'STUDENT1' ); apex_application_install.set_application_alias( 'F' || apex_application.get_application_id ); end; / @f645.sql declare l_workspace_id number; begin select workspace_id into l_workspace_id from apex_workspaces where workspace = 'TRAINING1'; -- apex_application_install.set_workspace_id( l_workspace_id ); apex_application_install.generate_application_id; apex_application_install.generate_offset; apex_application_install.set_schema( 'STUDENT1' ); apex_application_install.set_application_alias( 'F' || apex_application.get_application_id ); end; / @f645.sql declare l_workspace_id number; begin select workspace_id into l_workspace_id from apex_workspaces where workspace = 'TRAINING1'; -- apex_application_install.set_workspace_id( l_workspace_id ); apex_application_install.generate_application_id; apex_application_install.generate_offset; apex_application_install.set_schema( 'STUDENT1' ); apex_application_install.set_application_alias( 'F' || apex_application.get_application_id ); end; / @f645.sql