diff --git a/db/database/Startup/oracle/CreateDataPumpDir.sql b/db/database/Startup/oracle/CreateDataPumpDir.sql new file mode 100644 index 0000000000..7027c2b4bc --- /dev/null +++ b/db/database/Startup/oracle/CreateDataPumpDir.sql @@ -0,0 +1,18 @@ +SET ECHO ON +/************************************************************************* + * The contents of this file are subject to the Adempiere License. You may + * obtain a copy of the License at http://www.adempiere.org/license.html + * Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for details. Code: Adempiere ERP+CRM + * Copyright (C) 1999-2001 Jorg Janke, ComPiere, Inc. All Rights Reserved. + ************************************************************************* + * $Id: CreateUser.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $ + *** + * Title: Create or replace directory for data pump + * Description: + * Parameter: Directory + * Run as system + ************************************************************************/ +CREATE OR REPLACE DIRECTORY ADEMPIERE_DATA_PUMP_DIR AS '&1' +/ +EXIT diff --git a/db/database/Startup/oracleXE/CreateDataPumpDir.sql b/db/database/Startup/oracleXE/CreateDataPumpDir.sql new file mode 100644 index 0000000000..7027c2b4bc --- /dev/null +++ b/db/database/Startup/oracleXE/CreateDataPumpDir.sql @@ -0,0 +1,18 @@ +SET ECHO ON +/************************************************************************* + * The contents of this file are subject to the Adempiere License. You may + * obtain a copy of the License at http://www.adempiere.org/license.html + * Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for details. Code: Adempiere ERP+CRM + * Copyright (C) 1999-2001 Jorg Janke, ComPiere, Inc. All Rights Reserved. + ************************************************************************* + * $Id: CreateUser.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $ + *** + * Title: Create or replace directory for data pump + * Description: + * Parameter: Directory + * Run as system + ************************************************************************/ +CREATE OR REPLACE DIRECTORY ADEMPIERE_DATA_PUMP_DIR AS '&1' +/ +EXIT diff --git a/org.adempiere.server-feature/utils.unix/RUN_DBExport.sh b/org.adempiere.server-feature/utils.unix/RUN_DBExport.sh index f62bfe08b1..940b06c9e1 100644 --- a/org.adempiere.server-feature/utils.unix/RUN_DBExport.sh +++ b/org.adempiere.server-feature/utils.unix/RUN_DBExport.sh @@ -12,7 +12,7 @@ echo Export Adempiere Database - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\) # Parameter: / sh $ADEMPIERE_DB_PATH/DBExport.sh $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD -# sh $ADEMPIERE_DB_PATH/DBExportFull system $ADEMPIERE_DB_SYSTEM +# sh $ADEMPIERE_DB_PATH/DBExportFull.sh system/$ADEMPIERE_DB_SYSTEM if [ $ADEMPIERE_HOME ]; then cd $ADEMPIERE_HOME/utils diff --git a/org.adempiere.server-feature/utils.unix/RUN_DBExportdp.sh b/org.adempiere.server-feature/utils.unix/RUN_DBExportdp.sh new file mode 100644 index 0000000000..6a755b0a61 --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/RUN_DBExportdp.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# Author + Copyright 1999-2005 Jorg Janke +# $Id: RUN_DBExport.sh,v 1.10 2005/05/31 18:45:33 jjanke Exp $ +if [ $ADEMPIERE_HOME ]; then + cd $ADEMPIERE_HOME/utils +fi +. ./myEnvironment.sh Server +echo Export Adempiere Database - $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\) + + +# Parameter: / +sh $ADEMPIERE_DB_PATH/DBExportdp.sh $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD system/$ADEMPIERE_DB_SYSTEM + +# sh $ADEMPIERE_DB_PATH/DBExportFulldp.sh system/$ADEMPIERE_DB_SYSTEM + +if [ $ADEMPIERE_HOME ]; then + cd $ADEMPIERE_HOME/utils +fi +sh myDBcopy.sh + diff --git a/org.adempiere.server-feature/utils.unix/RUN_DBRestoredp.sh b/org.adempiere.server-feature/utils.unix/RUN_DBRestoredp.sh new file mode 100644 index 0000000000..f805ca4873 --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/RUN_DBRestoredp.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# $Id: RUN_DBRestore.sh,v 1.9 2005/01/22 21:59:15 jjanke Exp $ +if [ $ADEMPIERE_HOME ]; then + cd $ADEMPIERE_HOME/utils +fi +. ./myEnvironment.sh Server +echo Restore Adempiere Database from Export- $ADEMPIERE_HOME \($ADEMPIERE_DB_NAME\) + + +echo Re-Create Adempiere User and import $ADEMPIERE_HOME/data/ExpDat.dmp +echo == The import will show warnings. This is OK == +ls -lsa $ADEMPIERE_HOME/data/ExpDat.dmp +echo Press enter to continue ... +read in + +# Parameter: +# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle) +$ADEMPIERE_DB_PATH/DBRestore.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM + +$ADEMPIERE_HOME/utils/RUN_SignDatabaseBuild.sh diff --git a/org.adempiere.server-feature/utils.unix/oracle/DBExportFulldp.sh b/org.adempiere.server-feature/utils.unix/oracle/DBExportFulldp.sh new file mode 100644 index 0000000000..7c53fbd69e --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/oracle/DBExportFulldp.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +echo Adempiere Full Database Export $Revision: 1.3 $ + +# $Id: DBExportFull.sh,v 1.3 2005/01/22 21:59:15 jjanke Exp $ + +echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDatFull.dmp + +if [ $# -eq 0 ] + then + echo "Usage: $0 " + echo "Example: $0 system/manager" + exit 1 +fi +if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ] + then + echo "Please make sure that the environment variables are set correctly:" + echo " ADEMPIERE_HOME e.g. /Adempiere" + echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" + exit 1 +fi + +echo ------------------------------------- +echo Re-Create DataPump directory +echo ------------------------------------- +sqlplus $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $ADEMPIERE_HOME/data +chgrp dba $ADEMPIERE_HOME/data +chmod 770 $ADEMPIERE_HOME/data + +expdp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDatFull.dmp LOGFILE=ExpDatFull.log EXCLUDE=STATISTICS FULL=Y + +cd $ADEMPIERE_HOME/data +jar cvfM ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log + diff --git a/org.adempiere.server-feature/utils.unix/oracle/DBExportdp.sh b/org.adempiere.server-feature/utils.unix/oracle/DBExportdp.sh new file mode 100644 index 0000000000..5e1a505610 --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/oracle/DBExportdp.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +echo Adempiere Database Export $Revision: 1.5 $ + +# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $ + +echo Saving database $1@$ADEMPIERE_DB_NAME to $ADEMPIERE_HOME/data/ExpDat.dmp + +if [ $# -eq 0 ] + then + echo "Usage: $0 " + echo "Example: $0 adempiere adempiere" + exit 1 +fi +if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ] + then + echo "Please make sure that the environment variables are set correctly:" + echo " ADEMPIERE_HOME e.g. /Adempiere" + echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" + exit 1 +fi + +# Cleanup +sqlplus $1/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql + +echo ------------------------------------- +echo Re-Create DataPump directory +echo ------------------------------------- +sqlplus $3@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $ADEMPIERE_HOME/data +chgrp dba $ADEMPIERE_HOME/data +chmod 770 $ADEMPIERE_HOME/data + +# Export +expdp $1/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDat.dmp LOGFILE=ExpDat.log EXCLUDE=STATISTICS SCHEMAS=$1 + +cd $ADEMPIERE_HOME/data +jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log diff --git a/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh b/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh new file mode 100644 index 0000000000..cf2f78ed6f --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +# $Id: DBRestore.sh,v 1.8 2005/12/20 07:12:17 jjanke Exp $ +echo Adempiere Database Restore $Revision: 1.8 $ + +echo Restoring Adempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp + +if [ $# -le 2 ] + then + echo "Usage: $0 " + echo "Example: $0 system/manager adempiere adempiere" + exit 1 +fi +if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ] + then + echo "Please make sure that the environment variables are set correctly:" + echo " ADEMPIERE_HOME e.g. /Adempiere" + echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" + exit 1 +fi + + +echo ------------------------------------- +echo Re-Create DB user +echo ------------------------------------- +sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3 + +echo ------------------------------------- +echo Re-Create DataPump directory +echo ------------------------------------- +sqlplus $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $ADEMPIERE_HOME/data +chgrp dba $ADEMPIERE_HOME/data +chmod 770 $ADEMPIERE_HOME/data + +echo ------------------------------------- +echo Import ExpDat +echo ------------------------------------- +impdp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDat.dmp SCHEMAS=$2 + +echo ------------------------------------- +echo Create SQLJ +echo ------------------------------------- +$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/create.sh $ADEMPIERE_DB_USER/$ADEMPIERE_DB_PASSWORD + +echo ------------------------------------- +echo Check System +echo Import may show some warnings. This is OK as long as the following does not show errors +echo ------------------------------------- +sqlplus $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql diff --git a/org.adempiere.server-feature/utils.windows/RUN_DBExport.bat b/org.adempiere.server-feature/utils.windows/RUN_DBExport.bat index ae67386b92..d3cb43cb7e 100644 --- a/org.adempiere.server-feature/utils.windows/RUN_DBExport.bat +++ b/org.adempiere.server-feature/utils.windows/RUN_DBExport.bat @@ -6,10 +6,10 @@ @Rem Parameter: / @call %ADEMPIERE_DB_PATH%\DBExport %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% -@Rem call %ADEMPIERE_DB_PATH%\DBExportFull system %ADEMPIERE_DB_SYSTEM% +@Rem call %ADEMPIERE_DB_PATH%\DBExportFull system/%ADEMPIERE_DB_SYSTEM% @Echo If the following statement fails, fix your environment IF (%ADEMPIERE_HOME%) == () (CALL myDBcopy.bat) else (CALL %ADEMPIERE_HOME%\utils\myDBcopy.bat) @Rem Sleep 60 -@CHOICE /C YN /T 60 /D N > NUL \ No newline at end of file +@CHOICE /C YN /T 60 /D N > NUL diff --git a/org.adempiere.server-feature/utils.windows/RUN_DBExportdp.bat b/org.adempiere.server-feature/utils.windows/RUN_DBExportdp.bat new file mode 100644 index 0000000000..0493f298d5 --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/RUN_DBExportdp.bat @@ -0,0 +1,15 @@ +@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server) +@Title Export Adempiere Database - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%) +@Rem +@Rem $Id: RUN_DBExport.bat,v 1.16 2005/04/27 17:45:02 jjanke Exp $ +@Rem +@Rem Parameter: / + +@call %ADEMPIERE_DB_PATH%\DBExportdp %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% system/%ADEMPIERE_DB_SYSTEM% +@Rem call %ADEMPIERE_DB_PATH%\DBExportFulldp system/%ADEMPIERE_DB_SYSTEM% + +@Echo If the following statement fails, fix your environment +IF (%ADEMPIERE_HOME%) == () (CALL myDBcopy.bat) else (CALL %ADEMPIERE_HOME%\utils\myDBcopy.bat) + +@Rem Sleep 60 +@CHOICE /C YN /T 60 /D N > NUL diff --git a/org.adempiere.server-feature/utils.windows/RUN_DBRestoredp.bat b/org.adempiere.server-feature/utils.windows/RUN_DBRestoredp.bat new file mode 100644 index 0000000000..043a36bb93 --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/RUN_DBRestoredp.bat @@ -0,0 +1,18 @@ +@Rem $Id: RUN_DBRestore.bat,v 1.13 2005/01/22 21:59:15 jjanke Exp $ + +@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat Server) +@Title Restore Adempiere Database from Export - %ADEMPIERE_HOME% (%ADEMPIERE_DB_NAME%) + + +@echo Re-Create Adempiere User and import %ADEMPIERE_HOME%\data\ExpDat.dmp +@dir %ADEMPIERE_HOME%\data\ExpDat.dmp +@echo == The import will show warnings. This is OK == +@pause + +@Rem Parameter: +@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle) +@call %ADEMPIERE_DB_PATH%\DBRestoredp system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM% + +@Call %ADEMPIERE_HOME%\utils\RUN_SignDatabaseBuild.bat > NUL 2>&1 + +@pause diff --git a/org.adempiere.server-feature/utils.windows/oracle/DBExportFulldp.bat b/org.adempiere.server-feature/utils.windows/oracle/DBExportFulldp.bat new file mode 100644 index 0000000000..71a9c8a74c --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/oracle/DBExportFulldp.bat @@ -0,0 +1,35 @@ +@Echo Adempiere Full Database Export $Revision: 1.6 $ + +@Rem $Id: DBExportFull.bat,v 1.6 2005/04/27 17:45:01 jjanke Exp $ + +@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDatFull.dmp + +@if (%ADEMPIERE_HOME%) == () goto environment +@if (%ADEMPIERE_DB_NAME%) == () goto environment +@if (%ADEMPIERE_DB_SERVER%) == () goto environment +@if (%ADEMPIERE_DB_PORT%) == () goto environment +@Rem Must have parameter: systemAccount +@if (%1) == () goto usage + +@echo ------------------------------------- +@echo Re-Create DataPump Directory +@echo ------------------------------------- +@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateDataPumpDir.sql %ADEMPIERE_HOME%\data + +@expdp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDatFull.dmp LOGFILE=ExpDatFull.log EXCLUDE=STATISTICS FULL=Y + +@cd %ADEMPIERE_HOME%\data +@jar cvfM data\ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log + +@goto end + +:environment +@Echo Please make sure that the enviroment variables are set correctly: +@Echo ADEMPIERE_HOME e.g. D:\Adempiere +@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org + +:usage +@echo Usage: %0 +@echo Examples: %0 system/manager + +:end diff --git a/org.adempiere.server-feature/utils.windows/oracle/DBExportdp.bat b/org.adempiere.server-feature/utils.windows/oracle/DBExportdp.bat new file mode 100644 index 0000000000..0af91f20ca --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/oracle/DBExportdp.bat @@ -0,0 +1,40 @@ +@Echo Adempiere Database Export $Revision: 1.8 $ + +@Rem $Id: DBExport.bat,v 1.8 2005/04/27 17:45:01 jjanke Exp $ +@Rem +@Echo Saving database %1@%ADEMPIERE_DB_NAME% to %ADEMPIERE_HOME%\data\ExpDat.dmp + +@if (%ADEMPIERE_HOME%) == () goto environment +@if (%ADEMPIERE_DB_NAME%) == () goto environment +@if (%ADEMPIERE_DB_SERVER%) == () goto environment +@if (%ADEMPIERE_DB_PORT%) == () goto environment +@Rem Must have parameter: userAccount +@if (%1) == () goto usage + +@Rem Cleanup +@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql + +@echo ------------------------------------- +@echo Re-Create DataPump Directory +@echo ------------------------------------- +@sqlplus %3@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateDataPumpDir.sql %ADEMPIERE_HOME%\data + +@Rem The Export +@expdp %1/%2@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDat.dmp LOGFILE=ExpDat.log EXCLUDE=STATISTICS SCHEMAS=%1 + +@cd %ADEMPIERE_HOME%\Data +@copy ExpDat.jar ExpDatOld.jar +@jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log + +@goto end + +:environment +@Echo Please make sure that the enviroment variables are set correctly: +@Echo ADEMPIERE_HOME e.g. D:\Adempiere +@Echo ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org + +:usage +@echo Usage: %0 +@echo Examples: %0 adempiere adempiere + +:end diff --git a/org.adempiere.server-feature/utils.windows/oracle/DBRestoredp.bat b/org.adempiere.server-feature/utils.windows/oracle/DBRestoredp.bat new file mode 100644 index 0000000000..2e7266f861 --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/oracle/DBRestoredp.bat @@ -0,0 +1,53 @@ +@Echo Adempiere Database Restore $Revision: 1.6 $ + +@Rem $Id: DBRestore.bat,v 1.6 2005/08/27 02:27:10 jjanke Exp $ + +@Echo Restoring Adempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp + +@if (%ADEMPIERE_HOME%) == () goto environment +@if (%ADEMPIERE_DB_NAME%) == () goto environment +@if (%ADEMPIERE_DB_SERVER%) == () goto environment +@if (%ADEMPIERE_DB_PORT%) == () goto environment +@Rem Must have parameter: systemAccount adempiereID AdempierePwd +@if (%1) == () goto usage +@if (%2) == () goto usage +@if (%3) == () goto usage + +@echo ------------------------------------- +@echo Re-Create DB user +@echo ------------------------------------- +@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3 + +@echo ------------------------------------- +@echo Re-Create DataPump Directory +@echo ------------------------------------- +@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateDataPumpDir.sql %ADEMPIERE_HOME%\data + +@echo ------------------------------------- +@echo Import ExpDat +@echo ------------------------------------- +@impdp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDat.dmp SCHEMAS=%2 + +@echo ------------------------------------- +@echo Create SQLJ +@echo ------------------------------------- +@call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEMPIERE_DB_PASSWORD% + +@echo ------------------------------------- +@echo Check System +@echo Import may show some warnings. This is OK as long as the following does not show errors +@echo ------------------------------------- +@sqlplus %2/%3@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\AfterImport.sql + +@goto end + +:environment +@Echo Please make sure that the enviroment variables are set correctly: +@Echo ADEMPIERE_HOME e.g. D:\Adempiere +@Echo ADEMPIERE_DB_NAME e.g. dev1.adempiere.org + +:usage +@echo Usage: %0% +@echo Example: %0% system/manager adempiere adempiere + +:end