@ECHO OFF

REM *************************************************************************
REM *                                                                       *
REM *   ORACLE_HOME                                                         *
REM *   The location of your target database installation.                  *
REM *   Example: C:\PROGRA~1\oraclexe\app\oracle\product\10.2.0\server      *
REM *                                                                       *
REM *   The path must have no spaces. If you have spaces, then do "dir /x"  *
REM *   on the parent directory to see what the shortname is.               *
REM *                                                                       *
REM *************************************************************************

set ORACLE_HOME=C:\PROGRA~1\oraclexe\app\oracle\product\10.2.0\server

REM *************************************************************************
REM *                                                                       *
REM *   SOA_HOME                                                            *
REM *   The location of your SOA Suite installation.                        *
REM *   Example: c:\product\OracleAS_1                                      *
REM *                                                                       *
REM *   The path must have no spaces. If you have spaces, then do "dir /x"  *
REM *   on the parent directory to see what the shortname is.               *
REM *                                                                       *
REM *************************************************************************

set SOA_HOME=C:\product\10.1.3.1\OracleAS_1

REM *************************************************************************
REM *                                                                       *
REM *   Schema usernames and passwords                                      *
REM *   Don't use orabpel, oraesb, or oraowsm for the usernames.            *
REM *                                                                       *
REM *************************************************************************

set BPEL_USER=orabpel_OracleAS_1
set BPEL_PW=orabpel

set ESB_USER=oraesb_OracleAS_1
set ESB_PW=oraesb

set OWSM_USER=oraowsm_OracleAS_1
set OWSM_PW=oraowsm

REM *************************************************************************
REM *                                                                       *
REM *   SYS_PW                                                              *
REM *   The password for the SYS user in your target database               *
REM *                                                                       *
REM *   CONNECT_STRING                                                      *
REM *   The datasbase name for your target database.                        *
REM *   Example: ORCL or XE                                                 *
REM *                                                                       *
REM *************************************************************************

set SYS_PW=manager
set CONNECT_STRING=xe

REM *************************************************************************
REM *                                                                       *
REM *  The following three variables should not need to be modified, but    *
REM *  they are available here in the interest of being future proof        *
REM *                                                                       *
REM *************************************************************************

set BPEL_HOME=%SOA_HOME%\bpel\system\database\scripts
set ESB_HOME=%SOA_HOME%\integration\esb\sql\oracle
set OWSM_HOME=%SOA_HOME%\owsm\config\schemas\oracle

REM *************************************************************************
REM *************************************************************************
REM *************************************************************************
REM *                                                                       *
REM * Do not modify anything else beyond here.                              *
REM *                                                                       *
REM *************************************************************************
REM *************************************************************************
REM *************************************************************************

set PATH=%ORACLE_HOME%\bin;%PATH%

ECHO Installing schema %BPEL_USER%
sqlplus.exe /nolog @MyIrca_bpel.sql %BPEL_USER% %BPEL_PW% %SYS_PW% %CONNECT_STRING% %BPEL_HOME%

ECHO Installing schema %ESB_USER%
sqlplus.exe /nolog @MyIrca_esb.sql %ESB_USER% %ESB_PW% %SYS_PW% %CONNECT_STRING% %ESB_HOME%

ECHO Installing schema %OWSM_USER%
sqlplus.exe /nolog @MyIrca_owsm.sql %OWSM_USER% %OWSM_PW% %SYS_PW% %CONNECT_STRING% %OWSM_HOME%
