* Update postgresql import batch file

This commit is contained in:
Heng Sin Low 2007-01-02 19:53:18 +00:00
parent a62e40d529
commit a14038c003
1 changed files with 7 additions and 10 deletions

View File

@ -12,20 +12,17 @@
@if (%3) == () goto usage @if (%3) == () goto usage
@echo ------------------------------------- @echo -------------------------------------
@echo Re-Create DB user @echo Re-Create user and database
@echo ------------------------------------- @echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\CreateUser.sql %2 %3 @dropdb -U postgres %ADEMPIERE_DB_NAME%
@dropuser -U postgres %ADEMPIERE_DB_USER%
@createuser -U postgres -a -d %ADEMPIERE_DB_USER%
@createdb %ADEMPIERE_DB_NAME% -E UNICODE -O %ADEMPIERE_DB_USER% -U %ADEMPIERE_DB_USER%
@echo ------------------------------------- @echo -------------------------------------
@echo Import Adempiere.dmp @echo Import Adempiere_pg.dmp
@echo ------------------------------------- @echo -------------------------------------
@imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Adempiere.dmp FROMUSER=(%2) TOUSER=%2 @psql -d %ADEMPIERE_DB_NAME% -U %ADEMPIERE_DB_USER% -f %ADEMPIERE_HOME%/data/Adempiere_pg.dmp
@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\AfterImport.sql
@goto end @goto end