Release 10.1A: OpenEdge Development:
Basic Database Tools

> ## Create Incremental .df File

> Use this option to compare two databases’ schemas and create a `.df` file that contains any differences. You can then use the new `.df` file to upgrade from a database to the current database.

> Note: You need at least two databases connected to create an incremental `.df` file.

> When you choose this option, the Create Incremental Definitions File window shown in Figure 10–2 appears.

> Figure 10–2: Create Incremental Definitions File window

> The Data Dictionary lists all connected databases except the working database (which should be the database that has the newest version of the database schema). If you have more than two other databases connected, select the database that has the older version of the database schema. The Data Dictionary then prompts you for the filename to which you want to write the differences. The default filename is `delta.df`. The Data Dictionary displays the file, field, and index names as it compares the databases.

> You can then use this file to apply schema changes to an existing database.

> Note: If you use this option to create a `.df` file in conjunction with an object file to update schema changes, you must load the `.df` file and recompile before you can run the new r-code. You must recompile because the Data Dictionary reorders the indexes during the dump and load procedure.

> ##### Batch Incremental utility

> This command line utility creates a `.df` file from comparing two OpenEdge databases. A new file called `prodict/dump_inc.p` is parallel to `prodict/dump_df.p` and `prodict/load_df.p`. Procedure `dump_inc.p` will query the following environmental variables:

> - DUMP_INC_DFFILE — Name of file to dump to.

> - DUMP_INC_CODEPAGE — Output code page.

> - DUMP_INC_INDEXMODE — Index–mode for newly created indexes. Allowed values are active or inactive.

> - DUMP_INC_RENAMEFILE — Name of the file that contains rename information.

> The format of this file is:

> `T`, <`old-table-name`>,<`new-table-name`>

> `F`, <`table-name`>,<`old-field-name`>,<`new-field-name`>

> `S`,<`old-sequence-name`>,<`new-sequence-name`>

> Note: There is no need to rename indexes because the code compares index elements and changes them automatically.

> - DUMP_INC_DEBUG

> 0 = debug off, only errors and important warnings

> 1 = all the above plus warnings

> 2 = all the above plus configuration information

> The first connected database is the source database and automatically receives the alias `DICDB`.

> Use the following code to call the “`dump_inc.p`” procedure:

>     $DLC/bin/_progres -b -db source-db -db target-db -p prodict/dump_inc.p

> The resulting `delta.df` file can then be applied to the target database, giving it the same definitions as the source database.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095