Tuesday, January 9, 2018

APEXExportSplitter deprecated in Oracle APEX 5.1.4

According to the Oracle APEX 5.1.4 patchset notes the APEXExportSplitter Java utility is deprecated.

That's not a bad thing, because it's simply been included into the APEXExport utility as an extra command option.

Better yet, it's been bundled into the Oracle SQLcl 17.4 utility.

In the screenshot above you can see the following commands run from within SQLcl.

!sql -version
This issues a host command to show the SQLcl version being used.


apex
Typing apex lists the apex applications owned by the current user.


!mkdir test
This issues a host command to create a new directory.


cd test
Within SQLcl change to the newly created directory.


apex export -applicationid 200 -skipExportDate -split
The bit we are interested in; the command to export an application from the database, and split it into seperate files in one statement.


!ls -l
Proving the f200.sql file was created, and then split into components in the f200 directory.

To see the full syntax available simply type "apex export" to view the help.

cardiac_own@orcl> apex export
    -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
    -split:            Split the exported file
    -splitFlat:        Split with no directory strucure
    -splitUpdate:      Generate update.sql file while splitting
    -splitNoCheckSum:  Overwrite all files

 Application Example:            apex export -applicationid 31500
 Workspace Example:              apex export -workspaceid 9999
  Instance Example:               apex export -instance
 Export All Workspaces Example:  apex export -expWorkspace
 Export Feedback to development environment:
         apex export -workspaceid 9999 -expFeedback
 Export Feedback to deployment environment EA2 since 20100308:
         apex export -workspaceid 9999 -expFeedback -deploymentSystem EA2 -expFeedbackSince 20100308
Happy new year! Now, I've got some command scripts to update...