* Facelift the setup dialog
* Make the setup of oracle tns name optional. This also remove the current limitation where your client tns name must be the same as the server database service name.
This commit is contained in:
parent
6e3dc21754
commit
6c695dd8e5
|
@ -17,6 +17,7 @@
|
|||
|
||||
|
||||
@Rem Database ...
|
||||
@SET ADEMPIERE_DB_SERVER=@ADEMPIERE_DB_SERVER@
|
||||
@SET ADEMPIERE_DB_USER=@ADEMPIERE_DB_USER@
|
||||
@SET ADEMPIERE_DB_PASSWORD=@ADEMPIERE_DB_PASSWORD@
|
||||
@SET ADEMPIERE_DB_URL=@ADEMPIERE_DB_URL@
|
||||
|
|
|
@ -23,6 +23,8 @@ JAVA_HOME=@JAVA_HOME@
|
|||
export JAVA_HOME
|
||||
|
||||
# Database ...
|
||||
ADEMPIERE_DB_SERVER=@ADEMPIERE_DB_SERVER@
|
||||
export ADEMPIERE_DB_SERVER
|
||||
ADEMPIERE_DB_USER=@ADEMPIERE_DB_USER@
|
||||
export ADEMPIERE_DB_USER
|
||||
ADEMPIERE_DB_PASSWORD=@ADEMPIERE_DB_PASSWORD@
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
|
||||
@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_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||
@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_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp Log=%ADEMPIERE_HOME%\data\ExpDat.log CONSISTENT=Y STATISTICS=NONE OWNER=%1
|
||||
@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
|
||||
|
|
|
@ -19,10 +19,10 @@ if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
|
|||
fi
|
||||
|
||||
# Cleanup
|
||||
sqlplus $1/$2@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql
|
||||
sqlplus $1/$2@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Daily.sql
|
||||
|
||||
# Export
|
||||
exp $1/$2@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp Log=$ADEMPIERE_HOME/data/ExpDat.log CONSISTENT=Y OWNER=$1
|
||||
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
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
|
||||
@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_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||
@sqlplus %1/%2@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Daily.sql
|
||||
|
||||
|
||||
@exp %1/%2@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDatFull.dmp Log=%ADEMPIERE_HOME%\data\ExpDatFull.log CONSISTENT=Y STATISTICS=NONE FULL=Y
|
||||
@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
|
||||
|
|
|
@ -18,7 +18,7 @@ if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
|
|||
exit 1
|
||||
fi
|
||||
|
||||
exp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDatFull.dmp Log=$ADEMPIERE_HOME/data/ExpDatFull.log CONSISTENT=Y FULL=Y
|
||||
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
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
@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
|
||||
|
@ -14,12 +15,12 @@
|
|||
@echo -------------------------------------
|
||||
@echo Re-Create DB user
|
||||
@echo -------------------------------------
|
||||
@sqlplus %1@%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 ExpDat
|
||||
@echo -------------------------------------
|
||||
@imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp FROMUSER=(%2) TOUSER=%2 STATISTICS=RECALCULATE
|
||||
@imp %1@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\ExpDat.dmp FROMUSER=(%2) TOUSER=%2 STATISTICS=RECALCULATE
|
||||
|
||||
@echo -------------------------------------
|
||||
@echo Create SQLJ
|
||||
|
@ -30,7 +31,7 @@
|
|||
@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_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
|
||||
|
||||
@goto end
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ fi
|
|||
echo -------------------------------------
|
||||
echo Re-Create DB user
|
||||
echo -------------------------------------
|
||||
sqlplus $1@$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 ExpDat
|
||||
echo -------------------------------------
|
||||
imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp FROMUSER=\($2\) TOUSER=$2
|
||||
imp $1@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/ExpDat.dmp FROMUSER=\($2\) TOUSER=$2
|
||||
|
||||
echo -------------------------------------
|
||||
echo Create SQLJ
|
||||
|
@ -37,4 +37,4 @@ 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_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
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
@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
|
||||
|
@ -14,12 +15,12 @@
|
|||
@echo -------------------------------------
|
||||
@echo Re-Create DB user
|
||||
@echo -------------------------------------
|
||||
@sqlplus %1@%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 -------------------------------------
|
||||
@imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
|
||||
@imp %1@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
|
||||
|
||||
echo -------------------------------------
|
||||
echo Create SQLJ
|
||||
|
@ -30,7 +31,7 @@ call %ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\create %ADEMPIERE_DB_USER%/%ADEM
|
|||
@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_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
|
||||
|
||||
@goto end
|
||||
|
||||
|
|
|
@ -21,14 +21,14 @@ fi
|
|||
echo -------------------------------------
|
||||
echo Re-Create DB user
|
||||
echo -------------------------------------
|
||||
echo sqlplus $1@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
|
||||
sqlplus $1@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql $2 $3
|
||||
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_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2"
|
||||
imp $1@$ADEMPIERE_DB_NAME FILE=$ADEMPIERE_HOME/data/Adempiere.dmp FROMUSER=\(reference\) TOUSER=$2
|
||||
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 Create SQLJ
|
||||
|
@ -39,5 +39,5 @@ 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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
||||
sqlplus $2/$3@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
||||
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
|
||||
|
|
|
@ -6,13 +6,14 @@
|
|||
|
||||
@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_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql Reference Adempiere
|
||||
@sqlplus %1@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql Reference Adempiere
|
||||
|
||||
@echo -------------------------------------
|
||||
@echo Import Reference
|
||||
|
@ -23,7 +24,7 @@ imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Reference.dmp FROMUSER=(re
|
|||
@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_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
|
||||
@sqlplus reference/adempiere@%ADEMPIERE_DB_SERVER%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
|
||||
|
||||
@goto end
|
||||
|
||||
|
|
|
@ -21,17 +21,17 @@ fi
|
|||
echo -------------------------------------
|
||||
echo Re-Create new user
|
||||
echo -------------------------------------
|
||||
sqlplus $1@$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateUser.sql Reference Adempiere
|
||||
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_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_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
||||
sqlplus reference/adempiere@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/AfterImport.sql
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
lsnrctl start
|
||||
|
||||
@Echo Starting Database ....
|
||||
@sqlplus "system/%ADEMPIERE_DB_SYSTEM%@%ADEMPIERE_DB_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Start.sql
|
||||
@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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# $Id: Start.sh,v 1.6 2005/01/22 21:59:15 jjanke Exp $
|
||||
|
||||
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Start.sql
|
||||
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_SERVER/$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Start.sql
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@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_NAME% AS SYSDBA" @%ADEMPIERE_HOME%\utils\%ADEMPIERE_DB_PATH%\Stop.sql
|
||||
@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
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
# SET ORACLE_SID=
|
||||
# export ORACLE_SID
|
||||
|
||||
sqlplus "system/$ADEMPIERE_DB_SYSTEM@$ADEMPIERE_DB_NAME AS SYSDBA" @$ADEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/Stop.sql
|
||||
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