Script for Apex application Backup on Windows

                  This is the script for taking the apex application backup 


REM ***** Parameters ******
REM Oracle information
REM To find SID name: select * from v$instance;
set oracleSID=PROD
set oracleSystemPass=xxxxx
set oraclePort=1521
REM Root directory where oracleapex*class files are stored
REM These is a sub directory from the extracted APEX install zip file
set apexExportJavaDir=C:apporacleadminapex_4.2.4_enapexutilitiesutilities
REM File that contains names of applications and workspaces
set apexHtmlFileName=apex_info.html
REM Directory where backups will be stored
set backupLocation=C:backup

REM ****** PATHS *********
REM Note: You may not need to explicitly define these as they may already be set in OS.
set ORACLE_HOME=C:apporacleproduct11.2.0dbhome_1
set JAVA_HOME=C:Program FilesJavajdk1.7.0_55bin
set CLASSPATH=%CLASSPATH%;.;%ORACLE_HOME%jdbclibojdbc5.jar;%apexExportJavaDir%
set PATH=%PATH%;.;C:Program FilesJavajdk1.7.0_55bin


REM ****** Other *********
set startRunLocation=%CD%

REM ****** Directory Setup ******
REM Create temp bacpkup location
mkdir %backupLocation%

REM ****** APEX BACKUP *******
REM Go to backup location to run backups in
cd %backupLocation%

set CurrentDate=%date%

mkdir %CurrentDate%

cd %CurrentDate% 

REM Export all applications
java oracle.apex.APEXExport -db -user xxxxx -password xxxxx$5832 -instance

 REM Generate listing of Workspaces and Applications

sqlplus xxxxx/xxxxx$5832@PROD @%startRunLocation%apex_backup_info.sql %apexHtmlFileName%
  • January 7, 2015 | 58 views
  • Comments