24.8 Exporting an Application and Application Components

Developers can export an application and related files to another Oracle Application Express instance.

Tip:

You can also export workspaces, applications, and related files from a command-line using the APEXExport program located in the Utilities folder in the downloaded installation zip file. See Oracle Application Express Administration Guide

24.8.1 About the Export Process

Exporting an application from Oracle Application Express is very straightforward process and produces a readable script file with a .SQL extension. You can run this SQL script in any Oracle Application Express environment which is the same release or later than the environment from which you are exporting. For example, an application exported from Oracle Application Express release 4.0 can be imported into an environment running Oracle Application Express release 4.0, 4.1, or 4.2 or a later release. However, you cannot export an application to an earlier Oracle Application Express release (for example, an application exported from Application Express release 4.2 cannot be imported into an environment running Application Express 4.1 or earlier).

An application export includes the application definition, supporting objects, and shared components (including plug-ins, images, CSS files, JavaScript files and other files which must be managed independently). Instead of exporting complete applications you can also choose to export specific components, such as a page. This also creates a SQL script file. There are limitations when importing components into a different environments. As a best practice, Oracle recommends you export complete applications rather than individual components. If you wish to export an application and there are components, such as pages that are not yet ready for testing, Oracle recommends you use Build Options to include or exclude various application components.

24.8.2 About The Export Page

You export an application definition and all associated files using the following tabs at the top of the Export page: Export, Workspace, Applications, Websheet, Themes, Plug-ins, User Interface Defaults, and Feedback.

You do not need to export an entire workspace unless you want to migrate workspace users or replicate shared component subscriptions in the target instance.

Once you export an application and any related files, you must import them into the target Oracle Application Express instance and then install them. As a general rule, always import the application first and then the related files.

Tip:

You can simplify the steps needed to deploy an application by creating a custom packaged application.

24.8.3 Exporting an Application

When you export an application, Oracle Application Express generates a text file containing PL/SQL API calls. An application export includes the application definition, supporting objects, and shared components (including plug-ins, images, CSS files, JavaScript files, and other files which must be managed independently).

To export an application:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. Click the Applications tab.
  3. Under Choose Application, select the application to export.
  4. Under Export Application:
    1. File Format - Select how rows in the export file are formatted. Options:
      • UNIX - The resulting file contains lines terminated by line feeds.

      • DOS - The resulting file contains lines terminated by carriage returns and line feeds.

      • Database - Saves the resulting file to the Export Repository instead of downloading it.

    2. Owner Override - By default, the application is owned by the owner identified in the application attribute owner. Use this attribute if you wish to import this application as a different schema owner then you are exporting.
    3. Build Status Override - Select the build status of the exported application. Options include:
      • Run Application Only - Users can only run an application. Selecting this option is an effective way to protect an application from modifications from other developers.

      • Run and Build Application - Developers and users can both run and edit an application.

      Tip:

      If you select Run Application Only, you cannot set the argument p_trace to Yes. The only way to change this setting after you import the application, is to log in to Oracle Application Express Administration Services. .

    4. Debugging - Options:
      • Yes - Exports the application with debugging enabled.

      • No - Exports the application with debugging disabled.

    5. As of - Specify a time in minutes to go to back to for your export. This option enables you to go back in time in your application, perhaps to get back a deleted object.

      This utility uses the DBMS_FLASHBACK package. Because the timestamp to System Change Number (SCN) mapping is refreshed approximately every five minutes, you may have to wait that amount of time to locate the version for which you are looking. The time undo information is retained and influenced by the startup parameter UNDO_RETENTION (the default is three hours). However, this only influences the size of the undo tablespace. While two databases can have the same UNDO_RETENTION parameter, you are able to go back further in time on a database with fewer transactions because it is not filling the undo tablespace, forcing older data to be archived.

  5. Under Export Preferences:
    1. Export Supporting Object Definitions - Specify whether to export supporting object definitions with your application.
      • Yes - Includes supporting object definitions in the application export. Does not automatically load supporting objects when invoked from a command line.

      • No - Does not include the supporting object definitions in the export.

      • Yes and Install on Import Automatically - Includes supporting object definitions and a call to install supporting objects in the application export. This option is valid only for command line installs. When application imports from the command line, it automatically installs or upgrades the supporting objects.

      Supporting object definitions include all configuration options and scripts and enable an application export to include database object definitions, image definitions, and seed data SQL statements encapsulated in a single file.

    2. Export Public Reports - Specify whether to include public reports with your application. Public reports are the public shared report settings saved by users from an interactive report or interactive grid.
      • Yes - Includes Public reports in the application export.

      • No - Does not include Public reports in the application export.

    3. Export Private Reports - Specify whether to include Private reports with your application. Private reports are the private customized settings saved by users from an interactive report or interactive grid.
      • Yes - Includes public reports in the application export.

      • No - Does not include public reports in the application export.

    4. Export Report Subscriptions - Specify whether to include interactive report or interactive grid subscription settings with your application. This will be limited to the unexpired subscription settings of all users for all interactive reports or interactive grids in the application.
      • Yes - Includes report subscriptions for the reports you are exporting in the application export.

      • No - Does not include report subscriptions for the reports in the application export.

    5. Export Developer Comments - Specify whether to include Developer Comments in your application export.
      • Yes - Includes Developer Comments in the application export.

      • No - Does not include Developer Comments in the export.

    6. Export Translations - Specify whether to include Translations with your application export.
      • Yes - Includes the translation mappings and all text from the translation repository.

      • No - Does not include translation mappings or the translation repository.

      Translation Text Messages and Dynamic Translations are always included in the application export. 

    7. Export with Original IDs - Specify whether the export file should contain the application component IDs as of now or as of the last import of this application.
      • Yes - Includes the IDs as of the last import.

      • No - Includes the current IDs of the components.

  6. Click Export.

Tip:

In addition to exporting the actual application file, you may also need to export other related files such as cascading style sheets, images, and script files.

See Also:

24.8.4 Exporting Application Components

You can use the Component Export Wizard to export shared components or page components to another application or workspace, back up a component before editing it, or create an export that functions as a patch to another Oracle Application Express instance.

To export shared components or page components:

  1. Navigate to the Component Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. From the Tasks list, click Export Application Components.

      The Component Export page appears.

  2. Click the following tabs and select the components to export:
    • Components displays shared application components and entire pages. Use the navigation bar at the top of the page to search for components.

    • Components by Page lists components of the selected page. Navigate to a specific page by making a selection from the Page list.

    • Build Option Status displays available build options. Use this page to turn build options on and off.

    For each tab, select the appropriate components and click Add to Export.

  3. Click Next.
  4. For Component Export:
    1. File Format - Select how rows in the export file are formatted:
      • UNIX - The resulting file contains lines terminated by line feeds.

      • DOS - The resulting file contains lines terminated by carriage returns and line feeds.

    2. As of - Specify a time in minutes to go to back to for your export. This option enables you to go back in time in your application, perhaps to get back a deleted object.

      This utility uses the DBMS_FLASHBACK package. Because the timestamp to System Change Number (SCN) mapping is refreshed approximately every five minutes, you may have to wait that amount of time to locate the version for which you are looking. The time undo information is retained and influenced by the startup parameter UNDO_RETENTION (the default is three hours). However, this only influences the size of the undo tablespace. While two databases may have the same UNDO_RETENTION parameter, you are able to go back further in time on a database with fewer transactions because it is not filling the undo tablespace, forcing older data to be archived.

    3. Click Export Components.

    Tip:

    For translated applications, the Export Translations field displays. To export the selected shared components for the primary language application and all translated applications, from Export Translations field, select Yes. To ensure text strings and markup are up-to-date, remember to synchronize the translated applications prior to exporting the translated components.

24.8.5 Exporting a Workspace

You can move or copy a workspace to another Oracle Application Express instance by exporting a workspace. When you export a workspace, Oracle Application Express creates an ASCII text SQL script of users, defined user groups, Team Development data, and workspace artifacts including SQL Scripts, SQL Command History, saved SQL, user preferences, developer login history, email logs, and user interface defaults.

To export a workspace:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. On the Export page, click the Workspace tab.
  3. Under Export Workspace:
    1. Include Team Development - Select Yes to include Team Development data such as Features, Milestones, To Do, Bugs, Feedback, Links and News. Only select Yes if the target instance for this workspace is not a runtime only instance. Otherwise, select No.
    2. Export Type - In most cases, you should not change the default value Minimal. Only select Full if you want to replicate to another instance all workspace artifacts including SQL Scripts, SQL Command History, saved SQL, user preferences, developer login history, email logs, and user interface defaults.
    3. File Format - Select how rows in the export file are formatted:
      • DOS - The resulting file contains lines terminated by line feeds.

      • UNIX - The resulting file contains lines terminated by carriage returns and line feeds.

    4. File Character Set - The export file will be encoded in the specified character set.
  4. Click Export.

    See Also:

    "Managing Application Express Users" in Oracle Application Express Administration Guide

24.8.6 Exporting a Page in an Application

WARNING:

Exporting and importing a single page to a different system is an advanced deployment technique with the following restrictions:

  • Both systems have to have the same application ID and workspace ID.

  • Both systems have to have the same IDs for Shared Components.

  • If the page references new or updated Shared Components, those have to be exported and imported first.

If these restrictions are not fulfilled, the import will fail.

.

To export a page in an application:

  1. Navigate to the appropriate application page:
  2. Click the Utilities menu and select Export.

    The Export Page Wizard appears.

  3. For Page, Identify the page you wish to export. You can select only one page for export at a time.
  4. From File Format, select how rows in the export file are formatted. Options include:
    • UNIX - The resulting file contains rows delimited by line feeds.

    • DOS - The resulting file contains rows delimited by carriage returns and line feeds.

  5. For As of, specify a time in minutes to go to back to for your export. This option enables you to go back in time in your application, perhaps to get back a deleted object.

    This utility uses the DBMS_FLASHBACK package. Because the timestamp to System Change Number (SCN) mapping is refreshed approximately every five minutes, you may have to wait that amount of time to locate the version for which you are looking. The time undo information is retained and influenced by the startup parameter UNDO_RETENTION (the default is three hours). However, this only influences the size of the undo tablespace. While two databases may have the same UNDO_RETENTION parameter, you are able to go back further in time on a database with fewer transactions because it is not filling the undo tablespace, forcing older data to be archived.

  6. Click Export Page.

24.8.6.1 Exporting a Websheet

Use the Export Websheet utility to make a Websheet application available to other users.

To export a Websheet application:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. On the Export page, click the Websheets tab.
  3. On Export Websheet:
    1. Websheet Application - Select the Websheet to export.
    2. File Format - Select how rows in the export file are formatted. Options:
      • UNIX - The resulting file contains lines terminated by line feeds.

      • DOS - The resulting file contains lines terminated by carriage returns and line feeds.

    3. Export Preferences - Select the appropriate options.
    4. Click Export.

24.8.7 About Exporting Static Files

You can export static application files and static workspace files by creating a ZIP file.

24.8.8 Exporting Themes

Use the Export Theme utility to export themes from one Oracle Application Express development instance to a file.

To export an application theme:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. Click the Themes tab.
  3. On the Themes page:
    1. Application - Select an application.
    2. Export Theme - Select the theme to export.
    3. File Format - Select how rows in the export file are formatted. Options include:
      • UNIX - The resulting file contains lines terminated by line feeds.

      • DOS - The resulting file contains lines terminated by carriage returns and line feeds.

    4. Click Export.

24.8.9 Exporting Plug-ins

Use the Export Plug-in utility to export plug-ins from one Oracle Application Express development instance to a file.

To export a Plug-in from the Export page:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. Click the Plug-ins tab.
  3. On the Plug-ins page:
    1. Application - Select an application.
    2. Plug-in - Select the plug-in to export.
    3. File Format - Select how rows in the export file are formatted. Options include:
      • UNIX - The resulting file contains rows delimited by line feeds.

      • DOS - The resulting file contains rows delimited by carriage returns and line feeds.

    4. Click Export.

See Also:

"Importing Plug-ins"

24.8.10 Exporting User Interface Defaults

This section describes how to export User Interface Defaults.

24.8.10.1 About Exporting User Interface Defaults

Exporting User Interface Defaults is useful when you plan to develop on a target system. User Interface Defaults are divided into two categories, the Table Dictionary, and the Attribute Dictionary.

  • The Table Dictionary consists is specific to tables and columns within a selected schema. These defaults are used over those defined in the Attribute Dictionary.

  • The Attribute Dictionary contains a set of attributes about a column that is used in creating forms and reports. The definitions are matched by column name and a particular definition can be shared among several columns by using synonyms.

When you export User Interface Defaults, all User Interface Defaults for the selected dictionary and schema are exported to a single SQL Command script. When prompted, save this file to your hard drive. The file contains an API call to create table hints by making calls to the application PL/SQL API. You can use this file to import User Interface Defaults to another database and Oracle Application Express instance.

See Also:

24.8.10.2 Exporting User Interface Defaults from the Export Page

To export User Interface Defaults from the Export page:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. Click the User Interface Defaults tab.
  3. On the Table Dictionary page:
    1. Schema - Select the schema that owns the table associated with the User Interface Defaults.
    2. File Format - Select how rows in the export file are formatted. Options include:
      • UNIX - The resulting file contains lines terminated by line feeds.

      • DOS - The resulting file contains lines terminated by carriage returns and line feeds.

    3. Click Export.
  4. On the Attribute Dictionary page:
    1. File Format - Select how rows in the export file are formatted. Options include:
      • UNIX - The resulting file contains rows delimited by line feeds.

      • DOS - The resulting file contains rows delimited by carriage returns and line feeds.

    2. Click Export.

24.8.10.3 Exporting User Interface Defaults from the User Interface Defaults Page

To export User Interface Defaults from the User Interface Defaults page:

  1. On the Workspace home page, click the SQL Workshop icon.
  2. Click Utilities.
  3. Click User Interface Defaults.

    The User Interface Defaults page appears.

  4. Select a dictionary:
    • Table Dictionary - Exports specific tables and columns within a selected schema.

    • Attribute Dictionary - Exports a set of column attributes used to create forms and reports.

  5. Under Tasks, click Export.
  6. For File format, select an option:
    • UNIX - The resulting file contains rows delimited by line feeds.

    • DOS - The resulting file contains rows delimited by carriage returns and line feeds.

    • Database - Exports to the file repository instead of producing a file to download.

  7. Click Export.

24.8.11 Exporting Team Development Feedback

Use the Export Feedback utility to synchronize feedback from a production or test system to the development system. The development system is identified by using the workspace setting Feedback Synchronization Source Identifier which is set on the Edit Workspace Information page. If exporting from a development system, the export process has an additional attribute called Deployment System where you specify to which deployment system, production or test, you want to synchronize the updated feedback to.

To export Team Development Feedback:

  1. Navigate to the Export page:
    1. On the Workspace home page, click the App Builder icon.
    2. On the App Builder home page, click Workspace Utilities.
    3. Click Export.
  2. Click the Feedback tab.
  3. On the Feedback page:
    1. Changes Since - Select the date of the oldest feedback to export. All feedback from this selected date until the current date is exported.
    2. File Format - Select how rows in the export file are formatted. Options include:
      • UNIX - The resulting file contains rows delimited by line feeds.

      • DOS - The resulting file contains rows delimited by carriage returns and line feeds.

    3. Click Export.

24.8.12 Exporting Script Files from the Script Repository

You can transfer selected scripts from your current Script Repository to a Script Repository in a different Workspace by using the Export and Import tasks.

To export script files:

  1. On the Workspace home page, click the SQL Workshop icon.
  2. Click SQL Scripts.
  3. On the Tasks list, click Export.
  4. Select the appropriate script files and click Add to Export.
  5. Review the file name and click Export All.

    Select the Remove check box to remove the script.

See Also:

"Using SQL Scripts" in Oracle Application Express SQL Workshop Guide