APEXtras

a development team dedicated to Oracle APEX

APEX deployment import batch file

leave a comment »

rem A list of all the Apex application numbers
SET APPLIST=200,201,202

rem The version-specific location of the exported SQL scripts
SET SCRIPTPATH=c:\incoming\scripts\%1\

rem Name for the temporary import SQL script
SET PACKAGESCRIPT=apex_import.sql

rem Or provide the password as a parameter to the batch file if there are
rem security issues about hard-coding it
SET SQLPLUS_LOGON=myoracleusername/myoraclepassword
SET MYSUFFIX=_stage

IF *%1==* goto :END

ECHO @%SCRIPTPATH%ALL_PACKAGES_%1.sql  >  %SCRIPTPATH%%PACKAGESCRIPT%
FOR %%f in (%APPLIST%) do call :APPIMPORT %%f
ECHO QUIT  >> %SCRIPTPATH%%PACKAGESCRIPT%

sqlplus %SQLPLUS_LOGON% @%SCRIPTPATH%%PACKAGESCRIPT%

goto :END

:APPIMPORT
  ECHO @%SCRIPTPATH%f%1_out%MYSUFFIX%.sql >> %SCRIPTPATH%%PACKAGESCRIPT%
  goto :EOF

:END

Back to Apex deployment script

Written by Roger

11 February, 2009 at 5:16 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: