Organize installer
This commit is contained in:
parent
2d9d6f7422
commit
2a8d954c60
|
@ -23,7 +23,7 @@
|
||||||
@SET ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
|
@SET ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
|
||||||
|
|
||||||
@Rem Oracle specifics
|
@Rem Oracle specifics
|
||||||
@SET ADEMPIERE_DB_PATH=@ADEMPIERE_DB_TYPE@
|
@SET ADEMPIERE_DB_PATH=@ADEMPIERE_DB_PATH@
|
||||||
@SET ADEMPIERE_DB_NAME=@ADEMPIERE_DB_NAME@
|
@SET ADEMPIERE_DB_NAME=@ADEMPIERE_DB_NAME@
|
||||||
@SET ADEMPIERE_DB_SYSTEM=@ADEMPIERE_DB_SYSTEM@
|
@SET ADEMPIERE_DB_SYSTEM=@ADEMPIERE_DB_SYSTEM@
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
|
||||||
export ADEMPIERE_DB_URL
|
export ADEMPIERE_DB_URL
|
||||||
|
|
||||||
# Oracle Specifics ...
|
# Oracle Specifics ...
|
||||||
ADEMPIERE_DB_PATH=oracle
|
ADEMPIERE_DB_PATH=@ADEMPIERE_DB_PATH@
|
||||||
export ADEMPIERE_DB_PATH
|
export ADEMPIERE_DB_PATH
|
||||||
ADEMPIERE_DB_NAME=@ADEMPIERE_DB_NAME@
|
ADEMPIERE_DB_NAME=@ADEMPIERE_DB_NAME@
|
||||||
export ADEMPIERE_DB_NAME
|
export ADEMPIERE_DB_NAME
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
@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
|
||||||
|
@Rem Must have parameter: userAccount
|
||||||
|
@if (%1) == () goto usage
|
||||||
|
|
||||||
|
@Rem Clanup
|
||||||
|
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||||
|
|
||||||
|
@Rem The Export
|
||||||
|
@exp %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp Log=%ADEMPIERE_HOME%\data\ExpDat.log CONSISTENT=Y STATISTICS=NONE OWNER=%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 <userAccount>
|
||||||
|
@echo Examples: %0 adempiere adempiere
|
||||||
|
|
||||||
|
:end
|
|
@ -0,0 +1,28 @@
|
||||||
|
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 <userAccount>"
|
||||||
|
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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql
|
||||||
|
|
||||||
|
# Export
|
||||||
|
exp $1/$2@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp Log=$ADEMPIERE_HOME/data/ExpDat.log CONSISTENT=Y OWNER=$1
|
||||||
|
|
||||||
|
cd $ADEMPIERE_HOME/data
|
||||||
|
jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log
|
|
@ -0,0 +1,33 @@
|
||||||
|
@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
|
||||||
|
@Rem Must have parameter: systemAccount
|
||||||
|
@if (%1) == () goto usage
|
||||||
|
|
||||||
|
|
||||||
|
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||||
|
|
||||||
|
|
||||||
|
@exp %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDatFull.dmp Log=%ADEMPIERE_HOME%\data\ExpDatFull.log CONSISTENT=Y STATISTICS=NONE 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 <systemAccount>
|
||||||
|
@echo Examples: %0 system/manager
|
||||||
|
|
||||||
|
:end
|
|
@ -0,0 +1,25 @@
|
||||||
|
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 <systemAccount>"
|
||||||
|
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
|
||||||
|
|
||||||
|
exp $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDatFull.dmp Log=$ADEMPIERE_HOME/data/ExpDatFull.log CONSISTENT=Y FULL=Y
|
||||||
|
|
||||||
|
cd $ADEMPIERE_HOME/data
|
||||||
|
jar cvfM ExpDatFull.jar ExpDatFull.dmp ExpDatFull.log
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
@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
|
||||||
|
@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_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
|
||||||
|
|
||||||
|
@echo -------------------------------------
|
||||||
|
@echo Import ExpDat
|
||||||
|
@echo -------------------------------------
|
||||||
|
@imp %1@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp FROMUSER=(%2) TOUSER=%2 STATISTICS=RECALCULATE
|
||||||
|
|
||||||
|
@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_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% <systemAccount> <AdempiereID> <AdempierePwd>
|
||||||
|
@echo Example: %0% system/manager adempiere adempiere
|
||||||
|
|
||||||
|
:end
|
|
@ -0,0 +1,40 @@
|
||||||
|
# $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 <systemAccount> <AdempiereID> <AdempierePWD>"
|
||||||
|
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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
|
||||||
|
|
||||||
|
echo -------------------------------------
|
||||||
|
echo Import ExpDat
|
||||||
|
echo -------------------------------------
|
||||||
|
imp $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp FROMUSER=\($2\) TOUSER=$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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
|
@ -0,0 +1,42 @@
|
||||||
|
@Echo Adempiere Database Import $Revision: 1.9 $
|
||||||
|
|
||||||
|
@Rem $Id: ImportAdempiere.bat,v 1.9 2005/09/24 01:50:41 jjanke Exp $
|
||||||
|
|
||||||
|
@Echo Importing Adempiere DB from %ADEMPIERE_HOME%\data\Adempiere.dmp (%ADEMPIERE_DB_NAME%)
|
||||||
|
|
||||||
|
@if (%ADEMPIERE_HOME%) == () goto environment
|
||||||
|
@if (%ADEMPIERE_DB_NAME%) == () goto environment
|
||||||
|
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
|
||||||
|
@Rem Must have parameters 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_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql %2 %3
|
||||||
|
|
||||||
|
@echo -------------------------------------
|
||||||
|
@echo Import Adempiere.dmp
|
||||||
|
@echo -------------------------------------
|
||||||
|
@imp %1@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
|
||||||
|
|
||||||
|
@echo --------========--------========--------========--------
|
||||||
|
@echo System Check - The Import phase showed warnings.
|
||||||
|
@echo This is OK as long as the following does not show errors
|
||||||
|
@echo --------========--------========--------========--------
|
||||||
|
@sqlplus %2/%3@%ADEMPIERE_DB_SERVER%/%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 <systemAccount> <AdempiereID> <AdempierePwd>
|
||||||
|
@echo Example: %0 system/manager Adempiere Adempiere
|
||||||
|
|
||||||
|
:end
|
|
@ -0,0 +1,38 @@
|
||||||
|
# $Id: ImportAdempiere.sh,v 1.10 2005/12/20 07:12:17 jjanke Exp $
|
||||||
|
echo Adempiere Database Import $Revision: 1.10 $
|
||||||
|
|
||||||
|
echo Importing Adempiere DB from $ADEMPIERE_HOME/data/Adempiere.dmp
|
||||||
|
|
||||||
|
if [ $# -le 2 ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 <systemAccount> <AdempiereID> <AdempierePWD>"
|
||||||
|
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 -------------------------------------
|
||||||
|
echo sqlplus $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
|
||||||
|
sqlplus $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
|
||||||
|
|
||||||
|
echo -------------------------------------
|
||||||
|
echo Import Adempiere.dmp
|
||||||
|
echo -------------------------------------
|
||||||
|
echo "imp $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2"
|
||||||
|
imp $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2
|
||||||
|
|
||||||
|
echo -------------------------------------
|
||||||
|
echo Check System
|
||||||
|
echo Import may show some warnings. This is OK as long as the following does not show errors
|
||||||
|
echo -------------------------------------
|
||||||
|
echo sqlplus $2/$3@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
||||||
|
sqlplus $2/$3@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
|
@ -0,0 +1,40 @@
|
||||||
|
@Echo Adempiere Reference Database Import $Revision: 1.4 $
|
||||||
|
|
||||||
|
@Rem $Id: ImportReference.bat,v 1.4 2005/01/22 21:59:15 jjanke Exp $
|
||||||
|
|
||||||
|
@Echo Importing Reference DB from %ADEMPIERE_HOME%\data\Reference.dmp
|
||||||
|
|
||||||
|
@if (%ADEMPIERE_HOME%) == () goto environment
|
||||||
|
@if (%ADEMPIERE_DB_NAME%) == () goto environment
|
||||||
|
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
|
||||||
|
@Rem Must have parameter: systemAccount
|
||||||
|
@if (%1) == () goto usage
|
||||||
|
|
||||||
|
@echo -------------------------------------
|
||||||
|
@echo Re-Create new user
|
||||||
|
@echo -------------------------------------
|
||||||
|
@sqlplus %1@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql Reference Adempiere
|
||||||
|
|
||||||
|
@echo -------------------------------------
|
||||||
|
@echo Import Reference
|
||||||
|
@echo -------------------------------------
|
||||||
|
imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Reference.dmp FROMUSER=(reference) TOUSER=reference
|
||||||
|
|
||||||
|
@echo -------------------------------------
|
||||||
|
@echo Check System
|
||||||
|
@echo Import may show some warnings. This is OK as long as the following does not show errors
|
||||||
|
@echo -------------------------------------
|
||||||
|
@sqlplus reference/adempiere@%ADEMPIERE_DB_SERVER%/%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 <systemAccount>
|
||||||
|
@echo Examples: %0 system/manager
|
||||||
|
|
||||||
|
:end
|
|
@ -0,0 +1,37 @@
|
||||||
|
# $Id: ImportReference.sh,v 1.5 2005/01/22 21:59:15 jjanke Exp $
|
||||||
|
echo Adempiere Reference Database Import $Revision: 1.5 $
|
||||||
|
|
||||||
|
echo Importing Reference DB from $ADEMPIERE_HOME/data/Reference.dmp
|
||||||
|
|
||||||
|
if [ $# -eq 2 ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 <systemAccount>"
|
||||||
|
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 new user
|
||||||
|
echo -------------------------------------
|
||||||
|
sqlplus $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql Reference Adempiere
|
||||||
|
|
||||||
|
echo -------------------------------------
|
||||||
|
echo Import Reference
|
||||||
|
echo -------------------------------------
|
||||||
|
echo imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Reference.dmp FROMUSER=\(reference\) TOUSER=reference
|
||||||
|
imp $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Reference.dmp FROMUSER=\(reference\) TOUSER=reference
|
||||||
|
|
||||||
|
echo -------------------------------------
|
||||||
|
echo Check System
|
||||||
|
echo Import may show some warnings. This is OK as long as the following does not show errors
|
||||||
|
echo -------------------------------------
|
||||||
|
sqlplus reference/adempiere@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
@Rem $Id: Start.bat,v 1.7 2005/01/22 21:59:15 jjanke Exp $
|
||||||
|
|
||||||
|
@Echo Starting Listener ....
|
||||||
|
lsnrctl start
|
||||||
|
|
||||||
|
@Echo Starting Database ....
|
||||||
|
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Start.sql
|
||||||
|
|
||||||
|
@Echo Starting optional agent ....
|
||||||
|
agentctl start
|
||||||
|
|
||||||
|
@Echo ------------------------
|
||||||
|
lsnrctl status
|
|
@ -0,0 +1,3 @@
|
||||||
|
# $Id: Start.sh,v 1.6 2005/01/22 21:59:15 jjanke Exp $
|
||||||
|
|
||||||
|
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Start.sql
|
|
@ -0,0 +1,11 @@
|
||||||
|
@Rem $Id: Stop.bat,v 1.7 2005/01/22 21:59:15 jjanke Exp $
|
||||||
|
|
||||||
|
@Echo Stopping database ....
|
||||||
|
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Stop.sql
|
||||||
|
|
||||||
|
@Echo Stopping Listener ....
|
||||||
|
lsnrctl stop
|
||||||
|
|
||||||
|
@Echo Stopping (optional) Agent ....
|
||||||
|
agentctl stop
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# $Id: Stop.sh,v 1.7 2005/01/22 21:59:15 jjanke Exp $
|
||||||
|
|
||||||
|
# In a multi-instance environment set the environment first
|
||||||
|
# SET ORACLE_SID=
|
||||||
|
# export ORACLE_SID
|
||||||
|
|
||||||
|
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Stop.sql
|
||||||
|
|
Loading…
Reference in New Issue