Initialize the ADempiere Database

From ADempiere
Revision as of 08:21, 25 December 2010 by MJMcKay (Talk) (moved CreateDatabase to Initialize the ADempiere Database: Better title.)

Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
Cleanup.png This article may require cleanup to meet the Wiki Documents standards. It may contain obsolete information or is in need of organization. Please improve this page if you can.

Introduction

This Create Database HELP is for creating the database for your ADempiere installation. After this you can Complete ADempiere Server Install.

Pre-requisite Utilities

Before starting with the database creation, you should have the following installed:

  • Database supported by ADempiere
  • Java JDK1.5.x

Start with Database Creation

The initial ADempiere database is imported from the Adempiere.dmp file, located in the $ADEMPIERE_HOME/data directory. To start with, open a console window and go to this directory. Verify that the Adempiere.dmp file is located there.

For Linux users: it does not matter which user you log in as to create the database.

Oracle

Run the script RUN_ImportAdempiere (.bat or .sh in directory './utils'). You will see information about adempiere.dmp file (such as date creation, size, etc.) and the message: == The import will show warnings. This is Ok ==

CD Run ImportAdempiere.PNG

Press any key to start the process or Ctrl-C to cancel.

Don't worry if you see some warnings (such as Warning: object created with compilation warnings). This is normal and can be ignored. After the import has finished, a SQL procedure makes sure that everything has been imported correctly and will list any invalid objects.

CD Run ImportAdempiere2.PNG

At the process end, you should see a message similar to the one displayed below, with the text "no rows selected".

CD Run ImportAdempiere3.PNG

A common cause of problems when running this script is not setting the environment variables properly. The script will not run if ADEMPIERE_HOME, JAVA_HOME or ORACLE_HOME are not set incorrectly. It may also be necessary to add the Oracle bin directory to the PATH environment variable in some environments. If you have any further problems installing the Oracle database or you would like to remove it, additional information can be found under the following link:

http://download-east.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm#CIHDDHJD

PostgreSQL

Same as the Oracle step above. Note that the database dump for PostgreSQL is Adempiere_pg.jar and Adempiere_pg.dmp.

Note.gif Note:

If you receive an error that psql is not recognized, check that you have added the PostgreSQL bin directory (eg. C:\Program Files\PostgreSQL\8.2\bin) to the PATH environment variable. On multi-server installations, you may need to install postgres on the application server so the application scripts have access to the pgsql commands.

Please note that the SQL script which is stored in Adempiere_pg.dmp (no special dump, just a SQL script) does not create any users or roles for you, and does not create an adempiere role which is needed for the script, see Adempiere Install for Windows & PostgreSQL for this.

Reference for import PostgreSQL: Adempiere Install for Windows & PostgreSQL (Bepivin)

Modify postgresql connection configuration to allow connection from your subnet. File in data directory: pg_hba.conf

Next Step

The next step is Complete ADempiere Server Install.

Notes

  • Be careful: the script RUN_AdempiereImport DROPS the database, so if you run the script all your data will be lost!. Don't execute this script if you have data and you need them.
  • For Oracle Users:
    • Please make sure that the tablespaces for the database user Adempiere exist. The Default database tablespace names are:
      • default tablespace= USER (150 MB, 10 MB Autoextend),
      • index tablespace= INDX (100 MB, 10 MB Autoextend),
      • temporary tablespace= TEMP (100 MB, 10 MB Autoextend).
    • The setup script have been changed to use the EZCONNECT naming method instead of TNSNAMES. Open your Oracle Net Manager, under profile -> Naming, make sure EZCONNECT is one of the selected methods. Alternatively, verify that the SQLNET.ORA file has the following entries: NAMES.DIRECTORY_PATH = (EZCONNECT,TNSNAMES)

Links