Progress
Developer’s Toolkit


Upgrading with Updated .df and Encrypted Source

When you update a database structure in the development environment, you must then re-create these changes in the database that is already established at the deployment site. To accomplish this transfer, an incremental .df file is generated in the development environment. Copies of the original and updated databases are compared, and the differences between them are incorporated into an incremental .df file. For more information on creating an incremental 4GL data definitions file see the Progress Database Administration Guide and Reference for more information about deploying changes to database structures. The following general steps tell you how to prepare a .df file that includes new or modified data definitions:

In Windows, use the Data Administration Tool and follow these steps (for character interfaces, use the Data Dictionary):

  1. Connect the two databases by choosing Database Connect.
  2. Select the database that includes the new, modified data definitions as your current database by choosing Database Select Working Database.
  3. Create an incremental definition file by choosing Admin Dump Data and Definitions Create Incremental .df File.
  4. This option compares the data definitions in the nonempty copy to the current database schema and creates a new data definition (.df) file. The new .df file contains a record for each difference between the two schemas. The differences include any added, renamed, changed, or deleted file, field, or index.

    If a file, field, or index exists in the old database but not in the new schema, Progress asks you whether the object has been renamed. If you respond “no,” a record appears in the new .df file marking the object as deleted.

    If the new schema includes a new unique active index, Progress asks you whether you want to deactivate it. If you do not deactivate the index, and there are duplicate keys in the old database, Progress aborts your attempt to load new definitions into the old database. If you deactivate the index, the load procedure defines the new index, but does not create the index file. You must build and activate the index after loading the new data definitions.

  5. Perform steps a through d below for testing purposes. Then prepare a tool for users that performs these steps on site. (The upgrade template provided with the Developer’s Toolkit outlines one way to do this. Before you can use this template, you probably need to  modify it.)
    1. Select the copy of the old database as your working database.
    2. Load the updated data definitions by choosing Admin Load Data and Definitions Load Data Definitions (.df file).
    3. If you deactivated any indexes in Step 3, re-create data in the indexed fields as required to avoid duplicate keys. Then reactivate the indexes with PROUTIL IDXBUILD. For more information, see the Progress Database Administration Guide and Reference.
    4. Progress now updates the old database schema to match the modified schema. Compile and test all your procedures against the updated database.
  6. Test your procedures.
  7. Use the XCODE utility to encrypt procedures invalidated by the new data definitions.
  8. Since the new .df file changes CRC check sums and time-stamps only on the database tables that are actually modified, you only have to encrypt and ship the source versions of those procedures that access the changed tables. (If you compile your procedures with the XREF option, you get a listing of the tables accessed by each procedure.)

Using the Upgrade Template

The upgrade template, all .p files it uses, and all .inp files it uses are only templates; you must check each file and modify it to suit your particular application. Following is a list of checks and modifications you must make before using upgrade; your application might require additional changes.

The UNIX version of upgrade is found in /usr/dlctk/samples/unix. The DOS version is located in the respective subdirectories of samples. The files that upgrade uses can be found in /usr/dlctk/samples.

The upgrade template performs three basic actions to upgrade an application at the user’s site.

  1. Loads the new .df file, which you created from your version of the upgraded database with the Admin Dump Data and Definitions Create Incremental .df File option.
  2. Rebuilds any indexes deactivated during the data definition load process.
  3. Compiles encrypted source procedures.

Changes to the upgrade template for the data definition load stage (Step 1.):

Changes to the upgrade template for the rebuild deactivated indexes stage (Step 2.):

Changes to upgrade template for the compile encrypted procedures stage (Step 3.):

The upgrade template is relevant when you want to distribute only new data definitions and encrypted versions of affected application procedures. However, you might choose instead to ship a complete new version of the database and application, as described in the following section.


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