IDEMPIERE-279 RUN_ImportAdempiere not working on server installer

This commit is contained in:
Carlos Ruiz 2012-06-06 20:00:46 -05:00
parent 7e5ca899e2
commit fff6937a7c
3 changed files with 16 additions and 7 deletions

View File

@ -3,14 +3,21 @@
@if (%IDEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %IDEMPIERE_HOME%\utils\myEnvironment.bat Server)
@Title Import idempiere - %IDEMPIERE_HOME% (%ADEMPIERE_DB_NAME%)
SET SUFFIX=
SET SYSUSER=system
if (%ADEMPIERE_DB_PATH%) == (postgresql) SET SUFFIX=_pg
if (%ADEMPIERE_DB_PATH%) == (postgresql) SET SYSUSER=postgres
@echo Re-Create idempiere User and import %IDEMPIERE_HOME%\data\Adempiere.dmp - (%ADEMPIERE_DB_NAME%)
@dir %IDEMPIERE_HOME%\data\Adempiere.dmp
cd %IDEMPIERE_HOME%\data\seed
jar xvf Adempiere%SUFFIX%.jar
cd %IDEMPIERE_HOME%\utils
@dir %IDEMPIERE_HOME%\data\seed\Adempiere%SUFFIX%.dmp
@echo == The import will show warnings. This is OK ==
@pause
@Rem Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\ImportIdempiere system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@call %ADEMPIERE_DB_PATH%\ImportIdempiere %SYSUSER%/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@pause

View File

@ -2,7 +2,7 @@
@Rem $Id: ImportIdempiere.bat,v 1.9 2005/09/24 01:50:41 jjanke Exp $
@Echo Importing idempiere DB from %IDEMPIERE_HOME%\data\Adempiere.dmp (%ADEMPIERE_DB_NAME%)
@Echo Importing idempiere DB from %IDEMPIERE_HOME%\data\seed\Adempiere.dmp (%ADEMPIERE_DB_NAME%)
@if (%IDEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@ -21,7 +21,7 @@
@echo -------------------------------------
@echo Import Adempiere.dmp
@echo -------------------------------------
@imp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%IDEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
@imp %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% FILE=%IDEMPIERE_HOME%\data\seed\Adempiere.dmp FROMUSER=(reference) TOUSER=%2 STATISTICS=RECALCULATE
@echo --------========--------========--------========--------
@echo System Check - The Import phase showed warnings.

View File

@ -2,7 +2,7 @@
@Rem $Id: ImportIdempiere.bat,v 1.3 2005/01/22 21:59:15 jjanke Exp $
@Echo Importing idempiere DB from %IDEMPIERE_HOME%\data\Adempiere_pg.dmp (%ADEMPIERE_DB_NAME%)
@Echo Importing idempiere DB from %IDEMPIERE_HOME%\data\seed\Adempiere_pg.dmp (%ADEMPIERE_DB_NAME%)
@if (%IDEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
@ -29,9 +29,11 @@
@echo -------------------------------------
@echo Import Adempiere_pg.dmp
@echo -------------------------------------
@set ADEMPIERE_ALTER_ROLE_SQL=ALTER ROLE %2 SET search_path TO idempiere, pg_catalog
@set ADEMPIERE_ALTER_ROLE_SQL=ALTER ROLE %2 SET search_path TO adempiere, pg_catalog
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "%ADEMPIERE_ALTER_ROLE_SQL%"
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -f %IDEMPIERE_HOME%/data/Adempiere_pg.dmp
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -f %IDEMPIERE_HOME%/data/seed/Adempiere_pg.dmp
@set ADEMPIERE_ALTER_ROLE_SQL=