You can update an existing database schema to include schema changes made in a new database. Note that this procedure can also be used to merge two databases.

To load updated ABL data definitions:

  1. Make a copy of the database you want to update and save the original. The database should not be empty.
  2. Connect to the database that includes the new, modified data definitions.
  3. Access the appropriate Data tool (the Data Administration tool if you are using a graphical interface or the Data Dictionary if you are using a character interface).
  4. Choose Database > Connect Database. The Database Connect dialog box appears.
  5. Enter the name of the database you want to connect to and choose OK. The Data tool connects the database and returns you to the Data tool's main window.
  6. Choose Admin > Dump Data and Definitions > Create Incremental .df File. The Create Incremental .df File dialog box appears.

    The Create Incremental .df file option compares the data definitions in the nonempty copy to the current database schema and creates a new data definitions file. The new .df file contains a record for each difference between the two schemas. The differences include any added, renamed, changed, or deleted table, field, or index.

    You can choose to dump the delta.df file in both the old and new formats. To dump the delta.df file in the new format, select the Dump definitions in sections for phased load checkbox.

    If the new format is selected, then four sections are added to the file:
    • PreDeploy
    • Trigger
    • PostDeploy
    • Offline

    For more information about the dump data definition, see Dump incremental delta.df supporting online schema changes in OpenEdge Database Tools.

    If a table, field, or index exists in the old database but not in the new schema, the Data tool asks if you renamed the object. If you answer no, a record appears in the new .df file marking the object as deleted.

    If the new schema includes a new, unique, active index, the Data tool prompts you to deactivate it. If you do not deactivate the index and there are duplicate keys in the old database, the system 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 complete Step 8 to build and activate the index after loading the new data definitions.

  7. Enter the database name or accept the default databases, then choose OK.
  8. Connect to the copy of the old database.
  9. Load the updated data definitions by choosing Admin > Load Data and Definitions > Data Definitions (.df files).
    The Load Data Definitions window is displayed. You will have the option to load the old or new format delta.df file. To load the new format delta.df, select the Load by sections checkbox. After you select Load by sections, the checkboxes for PreDeploy, Trigger, PostDeploy, and Offline become active, and you can select which sections to load. You must select at least one of the checkboxes.
    Note: If you do not select a checkbox after selecting Load by sections and click OK, an error message is shown.

    By default, Load by section is unchecked, and the online schema related checkboxes are disabled. If you click OK now, then the old and new format .df file loads.

    Besides adding new tables (with its fields, indexes, & triggers), new sequences, new inactive indexes, and new fields to existing tables, you should select Add new objects on-line checkbox while loading the online changes such as non-structured fields, field rename, etc.

    Each section will have the schema change operations specific to the phase of the schema change. The Load Data Definition utility will apply the changes for selected sections, and each section in its own transaction. If an error is encountered while loading any of the four sections then it will undo that section only and load the other section successfully.

    It is not recommended to load a .df file if one of the sections is missing. If you try to load the .df file with a missing section and select a check-box to load that missing section, then the load df functionality will not work and will lead to unexpected results or corrupt schema.

    Note: The new delta.df format is compatible with the all OpenEdge versions. So, existing clients can successfully load it in its entirety without making any modification to the file.
  10. If you deactivated any indexes, re-create data in the indexed fields as required to avoid duplicate keys, then reactivate the indexes with PROUTIL IDXBUILD.
  11. The Data tool updates the old database schema to match the modified schema. Compile and test all your procedures against the updated database.