/xpd

Java program to export Progress database to MySQL.

Primary LanguageJava

xpd - eXport ProgressDB Daemon#

A program to export Progress database to MySQL.

List of backup tables:

  1. AprvVend
  2. Part
  3. PartBin
  4. PartDtl
  5. PartMtl
  6. PartOpr
  7. PartPlant
  8. PartRev
  9. PlantWhse
  10. PODetail
  11. POHeader
  12. Vendor
  13. JobAsmbl
  14. JobHead
  15. JobMtl
  16. RcvDtl

Backup Algorithm:

  1. Check if there are database connections
  2. Query all data from Progress table
  3. Save SQL file in file system
  4. Populate corresponding MySql table

How to Build

To package everything in one neat jar file:

mvn clean compile package

Usage

java -jar xpd

is:

Part, PartMtl, PartRev, PartPlant, AprvVend, PlantWhse, Vendor, PartOpr, PartBin, PartDtl, POHeader, PODetail, JobHead, RcvDtl, JobMtl, JobAsmbl

is:

--all : Export all tables. Ignores any supplied table names.

--file-only : Save to SQL file only.

Tuning MySql Performance

Inserting large amount of data to MySQL is slow, but the performance can be improved. Steps:

  1. Log into MySQL shell, use: mysql -h localhost -u root -p
  2. Supply password at prompt
  3. Check system variables max_allowed_packet and net_buffer_length, use these commands: SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'; and SHOW GLOBAL VARIABLES LIKE 'net_buffer_length';
  4. Issue following commands to import large data:

SET foreign_key_checks = 0;

SET UNIQUE_CHECKS = 0;

SET AUTOCOMMIT = 0;

source d:\path\file.sql;

(Once data import complete)

SET foreign_key_checks = 1;

SET UNIQUE_CHECKS = 1;

SET AUTOCOMMIT = 1;

exit;

Thats all!