Compiere ERP & CRM Migration Instructions Compiere Learning Services Division Copyright 2007 Compiere, inc. All rights reserved www.compiere.com
Table of Contents Compiere ERP & CRM Migration Instructions 1 Migration 2 2 Preserving Customizations 2 3 Migration Steps 2 4 Preparation 3 5 Test Mode 3 6 Version Migration 3 7 Install New Release 4 8 Migration Results 6 9 Application and User Changes 7 10 Post Migration 7 Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 1
Compiere ERP & CRM - Migration Instructions PREREQUISITES - A valid Support contract - The test/development/production systems all have the same Name. - The production system is copied to the test or development system. - The system Name, email, and password is defined in the System Administrator role. MIGRATION The Compiere Migration Management solution allows the following: Migrate from any release to 2.6.X release Migrate a single Client (Tenant) from one database to another database or user. Migrate/copy only setup (i.e. no transactions) Delete clients or transactions ("clean start") This document will cover Migrating from any Release to 2.6.X release. Note: This is an optional convenience service. A skilled DBA monitoring SVN changes and/or with the help of a change management system can do this as all scripts used are available in SVN. Another alternative are EAI tools. The added service is the packaging and a database health check. PRESERVING CUSTOMIZATIONS Compiere will not modify any customizations - as long as the customizations are marked appropriately! By default, all added records in the dictionary will have the entity type "User Maintained": In the Change Audit window, mark the changes as Customizations before running the migration. Alternatively, changes may be applied manually. Before performing the migration, run it in the test mode to ensure all customizations will be preserved. MIGRATION STEPS Migration Consists of the Following steps: Preparation Test Mode Version Migration Install New Release Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 2
PREPARATION Use the following steps to prepare for the Migration: 1) Server needs to have access to the Internet. 2) Start the application and using the System Administrator role, open the System window. 3) Enter the name of the installation in the Name field, (e.g. Company, Inc.) 4) Enter the email address and password used in the Compiere web store. 5) Shut down the Application Server RUN_Server2Stop 6) Backup the database via RUN_DBExport TEST MODE First, run the Migration Program in Test mode. This allows the ability to evaluate the actions taken when running it against the database. Please note that the first step (resolve ID conflicts) will not show the correct future IDs in test mode. If the program marks certain wanted tables for deletion, then create the table in the data dictionary (Window Table/Column) with the Entity Type User or Application. If the program marks certain wanted columns for deletion, make sure that the column has the Entity Type User or Application. If the wanted column has the Entity Type Data Dictionary or Compiere and it is marked for deletion, then copy it under another name and mark the new column as Custom or Application. The same applies to windows, tabs, fields, etc. Mandatory User or Application Columns must have a default value defined in the database, e.g. ALTER TABLE sometable MODIFY (mycolumn DEFAULT 'mydefault'), otherwise adding new records will result in an error. VERSION MIGRATION Data Version: When starting the application with a new version, and the previous database, the following error message will display: Select the Migrate button to start (only if all prerequisites are fulfilled) or select No to ignore. Note: Ignoring will cause instabilities and probably data corruption. Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 3
Migration may also take place from the operating system directly via the script RUN_Migrate - Start the data migration program from the database server. - Shut down (do not start) the Application Server. Check List: Server has HTTP (port 80) access to the Internet Compiere web store Asset - Migration or Support Contract In the System window, Enter the web store email/password System Operation Steps: Resolve ID Conflicts from Customizations/Extensions Synchronize Data Structure (Table/Column/Index/Constraints/..) Synchronize Data Content INSTALL NEW RELEASE Use the following steps for installing the New release: 1) Delete the existing jboss subdirectory (due to different JBoss version and configuration files.) 2) Download and unzip/untar the distribution file, (e.g. Compiere_2XX.X.zip.) Note: It is also possible to extract the distribution file into a new directory and copy your configuration files. Then change the COMPIERE_HOME environment variable to the new directory. 3) Download the jpdfprinterprod.jar file from the web store and save it in the COMPIERE_HOME/lib directory. Hint: This step is important if the jar file has been downloaded prior to November 2004. Otherwise, Web Start will fail with the error message that the jar files are from different signers. 4) Execute RUN_setup to update your environment. Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 4
5) Execute the script RUN_ImportReference Note: In the event RUN_Import was executed (i.e. a fresh system) and a backup is in place, simply RUN_DBRestore. 6) From the database server, start the migration via the script RUN_Migrate. Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 5
MIGRATION RESULTS Running migration might produce the following errors: ORA-02296: cannot enable.. - (create the missing defaults or ignore - usually fixed in data migration) ORA-01408: such column list already indexed.. - (ignore) ORA-02275: such a referential constraint already exists.. - (ignore) ORA-00001: unique constraint.. violated.. - (ignore in ID migration [were indirectly already corrected]) The Step "Table/Column Structure" is a subset of "Complete Database Structure". The latter also compares indexes and constraints. It is common to run the steps "Complete Database Structure" and "Data Content" a second time after completing the migration. The reasons for this are automatic data dependencies (e.g. trigger) and sequencing issues (for modifying indexes and constraints). The Following is an example of a successful Migration. It is also possible to the log file available in COMPIERE_HOME After migration, (re-) apply the language packs when needed. Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 6
APPLICATION AND USER CHANGES The migration tool allows the following options: Ignore Application/User changes in the Source o if selected customizations in the source are ignored (the default) o if de-selected you can copy customizations from your source system Overwrite Application/User changes in the Target o if selected you will replace/delete/overwrite all customizations of the target system o if de-selected you will preserve your customizations (the default) Use caution when changing these options as all customizations could be deleted. Changing these options allow the ability to copy/migrate e.g. settings from a test system to a production system. 1) Review and compare the migrated environment. 2) Check the Release Notes for manual Post Migration Steps. POST MIGRATION After Migration, proceed with following steps for Post Migration: 1) On the server start the Client (e.g. via RUN_Compiere2) - Do NOT start the Application Server yet! 2) After logging in, Compiere will prompt user to begin the Post-Migration procedures - click Yes. 3) Start the Application Server via RUN_Server2 Compiere Learning Services Copyright 2007 Compiere Inc. All rights reserved 7