Defining a primary key constraint definition
Print
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
The following procedure describes how to define a primary key constraint definition.
To define a primary key constraint definition:
- Start Data Administration and connect to the OpenEdge database you are migrating.
-
Select DataServer > MS SQL Server Utilities > Server
Attributes > View/Maintain Foreign Constraints.
The View/Maintain Foreign Constraint Definitions dialog box appears.
-
Select the table for which you are defining a primary
key constraint definition and click Create Constraints.
The Create Foreign Constraint Definitions for tablename dialog box appears, as shown in the following figure.
Figure 1. Create Foreign Constraint Definitions for tablename dialog box 
- Accept the default constraint definition name, or enter a new one.
- Select an index for the primary key constraint definition. Only indexes with an I in the All Columns Mandatory column are recommended for the primary key constraint definition. As long a column is unique, you can select as the primary constraint. Note, however, that the columns designated as the primary constraint are migrated as NOT NULL capable. That is, if you store many records in your OpenEdge database with the unknown value, they cannot be migrated to the foreign data source, given the defined primary constraint on that server object.
- By default, the primary key constraint definition has the Active check box selected. Leave this box selected if you want the constraint definition you are defining to be available for migration.
-
For the DataServer for MS SQL Server, if no clustered index
constraint definition is currently defined, the Clustered check
box is selected. Leave selected if you want the clustered index
constraint definition to also be applied to the index you are selecting
for the primary key constraint definition.
Note: Progress Software Corporation recommends defining primary and clustered constraint definitions for the same index whenever possible.
- Optionally, add a description of the constraint definition in the Description box.
- Click OK to save the constraint definition and exit the dialog box.
-
Click Create to save the constraint definition
and remain in the dialog box and continue defining constraint definitions
for the selected table.
If the primary constraint definition is incorrectly defined, a message is displayed and the constraint definition is not created.
The system fails to generate a constraint definition when an index is not defined as unique by the presence of either an OpenEdge unique attribute (indicated by an I) or by a unique constraint definition (indicated by a C) in the Unique column.