Exporting an Application and Related Files

You export and import application definitions and all associated files using the Workspace Users, Application, CSS, Images, Files, Themes, and User Interface Defaults tabs located at the top of the Export page. Note that it is not necessary to export a 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. See "How to Move an Application to Another Development Instance".

Tip:

You can simplify the steps needed to deploy an application by creating a packaged application. See "How to Create a Packaged Application".

This section contains the following topics:

Exporting an Application

When you export an application, Oracle Application Express generates a text file containing PL/SQL API calls.

To export an application:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and then click Next.

  2. From Application, select the application to be exported.

  3. From File Format, select how rows in the export file will be formatted:

    • Choose UNIX to have the resulting file contain rows delimited by line feeds.

    • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  4. From Owner Override, optionally select another owner. By default, the application is owned by the owner identified in the application attribute owner.

  5. From Build Status Override, select one of the following:

    • Run Application Only - Developers can only run an application

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

    Selecting Run Application Only is an effective way to protect an application from modifications from other developers.

    Tip:

    If you select Run Application Only, you cannot set the argument p_trace to Yes. See "Using Build Options to Control Configuration". Also, the only way to change this setting after you import the application, is to log in to Oracle Application Express Administration Services. See "Changing Application Build Status Set During Deployment" in Oracle Application Express Administration Guide.
  6. From Debugging, select one of the following:

    • Yes exports the application with debugging enabled.

    • No exports the application with debugging disabled.

  7. From Exporting Supporting Object Definitions, specify whether to export supporting object definitions with your application. Available options include: See "How to Create a Packaged Application".

  8. From Export Comments, specify whether to export comments for this application. See "Adding Developer Comments".

  9. Use the As of field to export your application as it was previously defined. Specify the number of minutes in the field provided.

    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.

  10. Click Export Application.

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.

Exporting Workspace Users

You can make an application available to other users by creating workspace users. When you export workspace users, Oracle Application Express creates an ASCII text SQL script of users and any defined user groups.

To export workspace users:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and then click Next.

  2. On the Export page, click the Workspace Users tab.

  3. From File Format, select how rows in the export file will be formatted:

    • Choose UNIX to have the resulting file contain rows delimited by line feeds.

    • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  4. Click Export Workspace Users.

See Also:

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

Exporting Application Components

You can export shared components or components of a page on the Component Export page. You can use this wizard to:

  • Export shared components or page components to another application or workspace

  • Back up a component before editing it

  • Create an export to function 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 Application 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 be exported:

  3. Click Add to Export.

  4. Click Next.

  5. On Components to Export:

    1. From File Format, select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    2. Use the As of field to export a page as it was previously defined. Specify the number of minutes in the field provided.

      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.

Exporting a Page in an Application

You can also export a specific page within an application by clicking the Export page icon on the Page Definition. When exporting a page, remember that exported pages can only be imported sucessfully if they have the same application ID and workspace ID.

To export a page in an application:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. On the Page Definition, you can export a page in two ways:

    • Click the Export Page icon, the down arrow in the upper right corner.

    • From the View list, select Export and click Go.

    The Export Page Wizard appears.

  3. From Page, select the page to be exported.

  4. From File Format, select how rows in the export file will be formatted:

    • Choose UNIX to have the resulting file contain rows delimited by line feeds.

    • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  5. Use the As of field to export a page as it was previously defined. Specify the number of minutes in the field provided.

    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.

Exporting Cascading Style Sheets

Use the Export Cascading Style Sheets utility to export uploaded cascading style sheets. Note that you can use this utility to export only uploaded cascading style sheets.

To export related cascading style sheets:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and then click Next.

  2. Click the CSS tab at the top of the page.

  3. On the Export Cascading Style Sheets page, select the following:

    1. Stylesheets - Select the cascading style sheets to export.

    2. File Format - Select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    3. Click Export Style Sheets.

Exporting Images

Use the Export Images utility to export uploaded images. When you export images using this utility, the images are converted to a text document. Note that you can use this utility to export only uploaded images.

To export upload images:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and then click Next.

  2. Click the Images tab at the top of the page.

  3. On the Export Images page, select the following:

    1. Export Images in Application - Select an application from which to export images.

      Be aware that selecting Workspace Images only exports those images in your repository that are not associated with a specific application. If all of your images are associated with specific applications, then the workspace image export file will be empty.

    2. File Format - Select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

  4. Click Export Images.

Exporting Static Files

Use the Export Static Files utility to export static files you have imported. Note that you can use this utility to export only uploaded static files.

To export related static files:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and then click Next.

  2. Click the Files tab at the top of the page.

  3. On Export Static Files, select the following:

    1. Static Files - Select the files to be exported.

    2. File Format - Select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    3. Click Export File(s).

About Importing into Another Oracle Application Express Instance

Note that you cannot use the Web interface described in this section to import exported static files into another Oracle Application Express instance. To import exported static files into another Oracle Application Express instance, use SQL*Plus while connected to the database. Note that you must export from and to a workspace having the same name and workspace ID.

Exporting Script Files

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.

Exporting Themes

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

Exporting a Theme from the Export Page

To export an application theme from the Export page:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and click Next.

  2. Click the Themes tab at the top of the page.

  3. On the Export Application Theme page, select the following:

    1. Export Theme - Select the theme to be exported.

    2. File Format - Select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    3. Click Export Theme.

Exporting a Theme from the Themes Page

To export an application theme from the Themes page:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. On the Application home page, click Shared Components.

  4. Under User Interface, select Themes.

    The Themes page appears.

  5. On the Tasks list, click Export Theme.

    The Export page appears.

  6. On the Export Theme page, select the following:

    1. Export Theme - Select the theme to be exported.

    2. File Format - Select how rows in the export file will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    3. Click Export Theme.

Exporting User Interface Defaults

Exporting User Interface Defaults is useful when you plan to develop on a target system.

When you export User Interface Defaults, all User Interface Defaults for the selected 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.

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 Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and click Next.

  2. Click the User Interface Defaults tab at the top of the page.

  3. On the Export User Interface Defaults page, select the following:

    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 will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    3. Click Export User Interface Defaults.

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 Application Builder icon.

  2. Select an application.

  3. On the Application Builder home page, click Shared Components.

  4. Under User Interface, select User Interface Defaults.

    The User Interface Defaults page appears.

  5. From the Tasks list, click Export.

  6. On the Export User Interface Defaults page, select the following:

    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 will be formatted:

      • Choose UNIX to have the resulting file contain rows delimited by line feeds.

      • Choose DOS to have the resulting file contain rows delimited by carriage returns and line feeds.

    3. Click Export User Interface Defaults.

Where Images, CSS, and Script Files Are Stored

In order to run, Oracle Application Express must have access to either Oracle HTTP Server and mod_plsql or the embedded PL/SQL gateway. Where images, CSS, and script files are stored depends upon the HTTP server you choose.

This section contains the following topics:

Where Images, CSS, and Script Files Are Stored When Using Oracle HTTP Server

In an Oracle HTTP Server or Oracle Application Server configuration, images are stored on the file system in the location referenced by the alias /i/. To locate the images directory on the file system, review the following files and search for the text alias /i/:

  • Oracle9i HTTP Server Release 2—see the httpd.conf file.

  • Oracle HTTP Server distributed with Oracle Database 11g—see the dads.conf file.

  • Oracle Application Server 10g—see the marvel.conf file.

Specific examples for locating the text alias /i/ can be found in Oracle Application Express Installation Guide

Where Images, CSS, and Script Files Are Stored When Using the Embedded PL/SQL Gateway

When running Oracle Application Express with the embedded PL/SQL gateway, images are stored directly in the database within the Oracle XML DB repository. You can access images by using the WebDAV feature of Oracle XML DB or by using FTP. To learn more, see "Using Protocols to Access the Repository" in Oracle XML DB Developer's Guide.