Amduus Information Works, Inc.

http://www.amduus.com

TECHNICAL BULLETIN: 2006221100526

TOPIC:

Use of CLI tools for exporting of Progress schema and data to MySQL with Amduus modifications to Mark Newnham's Pro2myv2 Open Source tool.

DISCUSSION:

The open source tool pro2myv2 has been modified by Amduus to be more UNIX oriented. (It originally was GUI oriented and can still be used in a GUI environment.) This way it can be used from a non-GUI environment and from cron for automatic data exporting and loading from Progress to MySQL.

Attn: This tool requires a developers or query license for the version of Progress it is being used on.

Attn: This tool has been tested for compatibility on Version 8, Version 9, and Version 10 of Progress.

The command exportschema.bash is used to export the schema of the database attached to via the -pf argument of the script.

It will export the database as MYSQL_logicalnameofdb.SQL. This file can be directly imported into a MySQL database cluster via the mysql command.

Warning: Any MySQL keywords that might be table, field, or database names in the Progress DB will be prefixed with X_ on the name.

Arguments to the command are:

-pf pffile.pf	Required	Progress DB connection parameters

-dlc installdir	Required	Directory Progress is installed in

-table [tablename|all]	Required	All outputs all tables. A single tablename

provides only a table.

exportschema.bash -dlc /prg/91e -pf /db/dev/amduus/amduus.pf -table all

The command export.bash is used to move data out of the Progress DB and into a (multiple) text file of SQL commands.

Warning: There is code in ptmd.p that will issue a DELETE FROM tablename which deletes ALL the data in that table before loading. This should not be used for incremental loads without commenting out that line of code. (A switch is planned in coming versions.)

Arguments to the command are:

-pf pffile.pf	Required	Progress DB connection parameters

-dlc installdir	Required	Directory Progress is installed in

-table [tablename|all]	Required	All outputs all tables. A single tablename

provides only a table.

export.bash -dlc /prg/91c -pf /db/dev/amduus/amduus.pf -table all

When the command is called with a single table name, an SQL file is made of the dump name of the table as defined in the Progress database with .SQL added to the end.

When the command is called with -table all, an SQL file is made for each table in the database based on the dump name of the table as defined in the Progress database with the .SQL added to the end.

Warning: Existing SQL files will be written over.

TECHNICAL BULLETIN: 2006221100526

Page 1 of 2

2006-08-09T09:59:19