APEX Application Migration
To Migrate a Schema used by an APEX application from one Database Instance to another...
Create target tablespace(s) for the application tables
Use DataPump to duplicate the Schema(s) supporting the application
@/u01/dba/oraapexwspace.sql
@/u01/dba/oraapexapps.sql
@/u01/dba/oraapexallapps.sql
An alternate script covering all applications including internal and unavailable...Unless you are exporting from a different instance, all variables except APXAPP and APXSYS should be set in your .profile.
export APXHST=$(hostname -s) # Hostname of Source database
export APXPRT=9999 # Port of Source database
export APXSID=${ORACLE_SID} # ORACLE_SID of Source database
export APXSYS=syspwd # SYSTEM password of Source database
export APXAPP=999 # Application ID of the application to be exported (not required for export of All)
export APXDIR=/u01/img/apex/18.1 # Installation Directory of Current version of APEX
To see current settings use:
env | grep APX
NOTE: APEXExport cannot currently use an Oracle Wallet.
cd ${APXDIR}
java oracle.apex.APEXExport -db ${APXHST}:${APXPRT}:${APXSID} -user system -password ${APXSYS} \
-applicationid ${APXAPP} -expPubReports -expSavedReports
cd ${APXDIR}
java oracle.apex.APEXExport -db ${APXHST}:${APXPRT}:${APXSID} -user system -password ${APXSYS} -instance
cd ${APXDIR}
java oracle.apex.APEXExport -db ${APXHST}:${APXPRT}:${APXSID} -user system -password ${APXSYS} -expWorkspace
cd ${APXDIR}
java oracle.apex.APEXExport
There is no APEXImport Utility.
You can import through the APEX front-end as a Workspace Administrator but only if you are running an APEX development environment for your production system (which is NOT considered best practice).
You can also connect to the target schema and run the sql file (created by the export) via SQL*Plus, SQLDeveloper or similar.