3.15.15 Exporting Workspaces, Apps, and Related Files from a Command-line

Export workspaces, applications, and related files from a command-line using the APEXExport utility.

Tip:

To review recommendations about optimizing the development and deployment of Application Express applications, see "Life Cycle Management with Oracle Application Express.".

To review a tutorial that demonstrates deployment options, go to the Oracle Online Learning Library at http://www.oracle.com/oll/apex and search for Advanced Deployment of Your Application.

See Also:

"Deploying an Application" in Oracle Application Express App Builder User’s Guide

3.15.15.1 About APEXExport

Learn about the APEXExport utility.

Program Requirements

The APEXExport program requires:

  • JDK (Java Development Kit) release 1.6 or higher

  • Oracle JDBC class libraries must be in your CLASSPATH

About APEXExport

APEXExport is a command-line utility for exporting workspaces, applications, and related files. Use the -split option to export files into separate files. Splitting application, page, and component exports into separate SQL files enables you to manage just the files with changes instead of exporting, inporting, and installing entire applications.

The Export as Zip option in the App Builder enables you to create an archive with the same directory structure and files as using the -split option.

See Also:

"Splitting Export Files into Separate Scripts" and "Directory Structure When Splitting Export Files into Separate Scripts" in Oracle Application Express App Builder User’s Guide

3.15.15.2 Using APEXExport

Use the APEXExport program to export workspaces, applications, and related files from a command-line. Use the -split option to export files into separate SQL scripts.

To use APEXExport:

  1. Set the CLASSPATH.

    Note:

    If your NLS character set is not one of US7ASCII, WE8DEC, WE8ISO8859P1,WE8MSWIN1252 or UTF8, you must also include orai18n.jar from the samedirectory path in the CLASSPATH.

    For example:

    • On UNIX and Linux:

      • Issue the command:

        export CLASSPATH=.:${ORACLE_HOME}/jdbc/lib/ojdbc6.jar

      • From the apex/utilities directory, issue the command:

        java oracle.apex.APEXExport

    • On Windows:

      • From the Bash shell:

        set CLASSPATH=%CLASSPATH%;.\;%ORACLE_HOME%\jdbc\lib\ojdbc6.jar

      • From the apex/utilities directory, issue the command:

        java oracle.apex.APEXExport

  2. Returns the following output with both usage directions and examples.
    Usage APEXExport -db  -user  -password  -applicationid  -workspaceid -instance -expWorkspace -expMinimal -expFiles -skipExportDate 
    -expPubReports -expSavedReports -expIRNotif -expTranslations -expTeamdevdata -expFeedback -deploymentSystem -expFeedbackSince 
    -expOriginalIds -debug -expNoSubscriptions -expComments -expSupportingObjects -nochecksum -split   
     -db:                   Database connect url in JDBC format
     -user:                 Database username
     -password:             Database password
     -applicationid:        ID for application to be exported
     -workspaceid:          Workspace ID for which all applications to be exported or the workspace to be exported
     -instance:             Export all applications
     -expWorkspace:         Export workspace identified by -workspaceid or all workspaces if -workspaceid not specified
     -expMinimal:           Only export workspace definition, users, and groups
     -expFiles:             Export all workspace files identified by -workspaceid
     -skipExportDate:       Exclude export date from application export files
     -expPubReports:        Export all user saved public interactive reports
     -expSavedReports:      Export all user saved interactive reports
     -expIRNotif:           Export all interactive report notifications
     -expTranslations:      Export the translation mappings and all text from the translation repository
     -expFeedback:          Export team development feedback for all workspaces or identified by -workspaceid to development or deployment
     -expTeamdevdata:       Export team development data for all workspaces or identified by -workspaceid
     -deploymentSystem:     Deployment system for exported feedback
     -expFeedbackSince:     Export team development feedback since date in the format YYYYMMDD
     -expOriginalIds:       If specified, the application export will emit ids as they were when the application was imported
     -expNoSubscriptions:   Do not export references to subscribed components     
     -expComments:          Export developer comments     
     -expSupportingObjects: Pass (Y)es, (N)o or (I)nstall to override the default     
     -expACLAssignments:    Export ACL User Role Assignments
     -dir:                  Save all files in the given directory, e.g. -dir some/sub/directory
     -list:                 List all changed applications in the workspace or components in the application
     -changesSince:         Expects date parameter (yyyy-mm-dd). Limit -list values to changes since the given date
     -changesBy:            Expects string parameter. Limit -list values to changes by the given user
     -expComponents:        Export application components. All remaining parameters must be of form TYPE:ID
     -debug:                Print debug output
     -nochecksum:           Overwrite existing files even if the contents have not changed
     -split:                Split applications into multiple files
    Application Example: 
       APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -applicationid 31500 
    Workspace  Example: 
       APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -workspaceid 9999 
    Instance Example:
       APEXExport -db localhost:1521:ORCL -user system -password systems_password -instance 
    Components Example:
       APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -applicationid 31500 -expComponents PAGE:1 PAGE:2 AUTHORIZATION:12345678
    List Example:
       APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -workspaceid 9999 -list -changesSince 2019-07-29
       APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -applicationid 31500 -list -changesBy EXAMPLE_USER
    Export All Workspaces Example:
       APEXExport -db localhost:1521:ORCL -user system -password systems_password -expWorkspace 
    Export Feedback to development environment:
      APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -workspaceid 9999 -expFeedback 
    Export Feedback to deployment environment EA2 since 20100308:
      APEXExport -db localhost:1521:ORCL -user scott -password scotts_password -workspaceid 9999 -expFeedback -deploymentSystem EA2 -expFeedbackSince 20100308