Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
The DataServer Tutorial : Managing server attributes : Generating constraint definitions from ROWID
 

Generating constraint definitions from ROWID

During the pull phase of a schema migration, choosing Select 'Best' ROWID Index with Foreign Schema, defers to the server API to determine the "best" index choice. The best index choice is based on many factors specific to the server and may provide insight into the server benefits of a particular index selection for ROWID.
You can choose to re-migrate your OpenEdge schema based on the previously derived ROWID designations, by using one of the following:
*Results of the Select 'Best' ROWID Index migration option from your schema pull
*Results of other ROWID sub-section migration options from your schema pull
*Results of the Designate Primary/Clustered index as ROWID option from your schema pull
Choosing, the Select 'Best' ROWID Index option might remove the legacy PROGRESS_RECID columns from foreign tables of the schema and enable new ROWID designation possibilities.
To harness the performance benefits of wise ROWID choices, you must import back primary and clustered key constraint definitions from your current schema holder into your original OpenEdge database in the form of constraint definitions. The wise ROWID choices are derived either from one of the previous ROWID designations from previous migrations or from pull exercises, which also designate a primary or clustered key index.
The performance benefits are accomplished by using the Generate constraints for ROWID option. Once the constraint definitions are back into the original OpenEdge database, they can be used for remigration to the server by using the Migrate Constraints option in the Advanced Options migration box. By doing so, the accumulation of designated primary and clustered indexes are repeated in the remigration, as constraint definitions always take priority over other ROWID designation options. Wherever the primary and clustered constraint definitions are found during the remigration, they are used to designate ROWID.
To generate constraint definitions from ROWID:
1. Start Data Administration and connect to the OpenEdge database you are migrating.
2. Choose DataServer > MS SQL Server Utilities > Server Attributes > Generate Constraints from ROWID.
The Generate Constraints from ROWID dialog box appears, as shown in the following figure:
Figure 25. Generate Constraints from ROWID dialog box
3. Specify your OpenEdge database name.
4. If you want to override any existing constraint definitions, check Overwrite existing constraint definitions.
5. Click OK to generate primary and mock clustered index constraint definitions from designated ROWID wherever primary and mock clustered index constraint definitions do not exist (or overwrites existing constraint definitions).
In this scenario, your original OpenEdge database is populated with primary and clustered constraint definitions based on the ROWID designations of the current schema image. The selecting the overwrite option indicates that it is permissible to replace existing constraint definitions with the definition derived in the schema holder.
After choosing to generate the constraint definitions based on ROWID, you can then consider a re-migrating to get the primary and clustered indexes constructed in the foreign schema by setting on the Migrate Constraints option on the re-migration, noting that you may need to clear existing ROWID designations in order to assign new ones.