core-jgi/utils/oracleXE/ImportReference.bat

42 lines
1.6 KiB
Batchfile
Raw Normal View History

2006-12-28 01:26:03 +07:00
@Echo Adempiere Reference Database Import $Revision: 1.4 $
2006-11-17 10:14:43 +07:00
2006-12-28 01:26:03 +07:00
@Rem $Id: ImportReference.bat,v 1.4 2005/01/22 21:59:15 jjanke Exp $
2006-11-17 10:14:43 +07:00
@Echo Importing Reference DB from %ADEMPIERE_HOME%\data\Reference.dmp
@if (%ADEMPIERE_HOME%) == () goto environment
@if (%ADEMPIERE_DB_NAME%) == () goto environment
2006-12-28 01:26:03 +07:00
@if (%ADEMPIERE_DB_SERVER%) == () goto environment
@if (%ADEMPIERE_DB_PORT%) == () goto environment
2006-11-17 10:14:43 +07:00
@Rem Must have parameter: systemAccount
@if (%1) == () goto usage
@echo -------------------------------------
@echo Re-Create new user
@echo -------------------------------------
@sqlplus %1@%ADEMPIERE_DB_SERVER%:%ADEMPIERE_DB_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\CreateUser.sql Reference Adempiere
2006-11-17 10:14:43 +07:00
@echo -------------------------------------
@echo Import Reference
@echo -------------------------------------
2006-12-28 01:26:03 +07:00
imp %1@%ADEMPIERE_DB_NAME% FILE=%ADEMPIERE_HOME%\data\Reference.dmp FROMUSER=(reference) TOUSER=reference
2006-11-17 10:14:43 +07:00
@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_PORT%/%ADEMPIERE_DB_NAME% @%ADEMPIERE_HOME%\Utils\%ADEMPIERE_DB_PATH%\AfterImport.sql
2006-11-17 10:14:43 +07:00
@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