3.12.11.2 APEXExportユーティリティを使用したエクスポート(非推奨)

APEXExportユーティリティを使用して、コマンドラインからワークスペース、アプリケーションおよび関連ファイルをエクスポートします。

ヒント:

APEXExportユーティリティは非推奨としてマークされており、Oracle APEXの将来のリリースで削除される可能性があります。かわりにOracle SQL Developer Command Line (SQLcl)を使用することをお薦めします。

参照:

3.12.11.2.1 APEXExportの概要

APEXExportユーティリティについて学習します。

プログラム要件

APEXExportプログラムの要件は次のとおりです。

  • JDK (Java Development Kit)リリース1.6以上

  • Oracle JDBCクラス・ライブラリがCLASSPATHに存在する必要があります。

APEXExportの概要

APEXExportは、ワークスペース、アプリケーションおよび関連ファイルをエクスポートするためのコマンドライン・ユーティリティです。ファイルを個別のファイルにエクスポートするには、-splitオプションを使用します。アプリケーション、ページおよびコンポーネントのエクスポートを別々のSQLファイルに分割することで、アプリケーション全体をエクスポート、インポートおよびインストールするかわりに、変更を含むファイルを管理するだけで済みます。

アプリケーション・ビルダーの「ZIPとしてエクスポート」オプションを使用して、-splitオプションを使用した場合と同じディレクトリ構造とファイルでアーカイブを作成できます。

3.12.11.2.2 APEXExportの使用

APEXExportプログラムを使用して、コマンドラインからワークスペース、アプリケーションおよび関連ファイルをエクスポートします。ファイルを個別のSQLスクリプトにエクスポートするには、-splitオプションを使用します。

APEXExportを使用するには:

  1. CLASSPATHを設定します。

    ノート:

    NLS文字セットがUS7ASCIIWE8DECWE8ISO8859P1WE8MSWIN1252またはUTF8のいずれでもない場合は、同じディレクトリ・パスからのorai18n.jarもCLASSPATHに含める必要があります。

    たとえば:

    • UNIXおよびLinuxの場合:

      • 次のコマンドを発行します。

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

      • apex/utilitiesディレクトリから、次のコマンドを発行します。

        java oracle.apex.APEXExport

    • Windowsの場合:

      • Bashシェルから次のようにします。

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

      • apex/utilitiesディレクトリから、次のコマンドを発行します。

        java oracle.apex.APEXExport

  2. 使用方法と使用例の両方を示した次の出力が返されます。
    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