BF[2911533] - Set Postgre DB Search Path
https://sourceforge.net/tracker/?func=detail&aid=2911533&group_id=176962&atid=879332 Fixed Windows DBRestore.bat file
This commit is contained in:
parent
38f7dba2ba
commit
53b4372910
|
@ -1,8 +1,6 @@
|
||||||
@Echo Adempiere Database Import $Revision: 1.3 $
|
@Echo ADempiere Database Import
|
||||||
|
|
||||||
@Rem $Id: ImportAdempiere.bat,v 1.3 2005/01/22 21:59:15 jjanke Exp $
|
@Echo Importing ADempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp (%ADEMPIERE_DB_NAME%)
|
||||||
|
|
||||||
@Echo Importing Adempiere DB from %ADEMPIERE_HOME%\data\ExpDat.dmp (%ADEMPIERE_DB_NAME%)
|
|
||||||
|
|
||||||
@if (%ADEMPIERE_HOME%) == () goto environment
|
@if (%ADEMPIERE_HOME%) == () goto environment
|
||||||
@if (%ADEMPIERE_DB_NAME%) == () goto environment
|
@if (%ADEMPIERE_DB_NAME%) == () goto environment
|
||||||
|
@ -31,13 +29,16 @@
|
||||||
@echo Import Adempiere_pg.dmp
|
@echo Import Adempiere_pg.dmp
|
||||||
@echo -------------------------------------
|
@echo -------------------------------------
|
||||||
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "drop schema sqlj cascade"
|
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -c "drop schema sqlj cascade"
|
||||||
|
@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 %ADEMPIERE_HOME%/data/ExpDat.dmp
|
@psql -h %ADEMPIERE_DB_SERVER% -p %ADEMPIERE_DB_PORT% -d %ADEMPIERE_DB_NAME% -U %2 -f %ADEMPIERE_HOME%/data/ExpDat.dmp
|
||||||
|
@set ADEMPIERE_ALTER_ROLE_SQL=
|
||||||
|
|
||||||
@set PGPASSWORD=
|
@set PGPASSWORD=
|
||||||
@goto end
|
@goto end
|
||||||
|
|
||||||
:environment
|
:environment
|
||||||
@Echo Please make sure that the enviroment variables are set correctly:
|
@Echo Please make sure that the environment variables are set correctly:
|
||||||
@Echo ADEMPIERE_HOME e.g. D:\ADEMPIERE2
|
@Echo ADEMPIERE_HOME e.g. D:\ADEMPIERE2
|
||||||
@Echo ADEMPIERE_DB_NAME e.g. adempiere or xe
|
@Echo ADEMPIERE_DB_NAME e.g. adempiere or xe
|
||||||
@Echo ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org
|
@Echo ADEMPIERE_DB_SERVER e.g. dbserver.adempiere.org
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $Id: ImportAdempiere.sh,v 1.10 2005/12/20 07:12:17 jjanke Exp $
|
echo ADempiere Database Import
|
||||||
echo ADempiere Database Import $Revision: 1.10 $
|
|
||||||
|
|
||||||
echo Importing Adempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp
|
echo Importing ADempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp
|
||||||
|
|
||||||
if [ $# -le 2 ]
|
if [ $# -le 2 ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue