Consultor Eletrônico



Kbase P184392: After adding a SQL constraint to a table, the table does not appear in the .df file when the definit
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   21/03/2011
Status: Unverified

SYMPTOM(s):

After adding a SQL constraint to a table, the table does not appear in the .df file when the definitions are dumped from the Data Administration tool

No feedback from Data Administration tool that table is not included in .df file

Behavior is the same even when the table with the SQL constraint is the only table dumped.

FACT(s) (Environment):

Added constraint using SQL ALTER TABLE statement
All Supported Operating Systems
OpenEdge 10.x

CAUSE:

Enhancement Request# OE00205908

CAUSE:

Bug# OE00205909

CAUSE:

This is expected behavior. A table with a SQL constraint is excluded from a .df file created by the Data Administration tool "Dump Data Definitions" option in order to prevent SQL constraints from being lost when the definitions are loaded from that .df file.
SQL constraint definitions are not understood by ABL. If the Data Administration tool were to dump a .df for the table with the SQL constraint definition, the .df would not capture that constraint definition. Therefore,when the .df was loaded the new table definition would be lacking the SQL constraint definition.
Alternatively, if the SQLSCHEMA utility were used to dump and load the table definition, it would recreate the table including the SQL constraint definitions. However, SQLSCHEMA does not capture all of the ABL attributes such as Format, Validation expression, Description, etc.
Enhancement Request# OE00205908 has been logged for feedback from the Data Administration tool that such a table will not be included in the .df file when data definitions are dumped.
Bug# OE00205909 has been logged to add a description of this behavior to the documentation.

FIX:

The following procedure may be used to dump and load tables with existing SQL constraints:

Use the SQLSCHEMA utility to dump the table definition. The constraints are dumped as ALTER TABLE statements.
Edit the ALTER TABLE statements produced by SQLSCHEMA to include only the constraints.
Drop the constraints using SQL Explorer.
Use the Data Administration tool to dump the table definition (.df file).
When it is time to reload the table:

Load the table from the .df using the Data Administration tool.
Load the constraints using SQLSCHEMA.