How to export/import full Oracle Apex applications

Script for Apex application and workspace export:

#!/bin/sh
#apex application backup

APPBKP=/u01/oracle/appbkp

WRKSPCBKP=/u01/oracle/wrkbkp

JAVA_HOME=/home/oracle/jdk1.7.0_71

cd /u01/TEST/apex/utilities

export CLASSPATH=/u01/TEST/app/oracle/product/12.1.0/db_1/oui/jlib/classes12.jar:

/home/oracle/jdk1.7.0_71/bin/java oracle.apex.APEXExport -db 172.168.25.11:1526:TEST -user system -password <xxxxxxxxx> -instance

mv f*.sql $APPBKP

#Apex workspace backup
/home/oracle/jdk1.7.0_71/bin/java oracle.apex.APEXExport -db 172.168.25.11:1526:TEST -user system -password <xxxxxxxxx> -expWorkspace

mv w*.sql $WRKSPCBKP

Script for Apex application and workspace import:

#!/bin/sh

#change as your apex schema name
#this script should run current directory where as applcation backup dir or workspace dir

cd /u01/backup
ls -ltr *.sql|awk {‘print $9’}>hi.txt
 cat hi.txt|while read line
do
sqlplus “/ as sysdba”<<!
alter session set current_schema = APEX_050000;
@$line
exit;
!
done

  • September 29, 2018 | 18 views
  • Comments