It has never been the intent that the full Progress metaschema are documented. These are internal tables used for relational database functionality. While there is nothing preventing users with appropriate security privilege from updating these, it remains unsupported and the consequences can be dire when the many dependencies are not understood. Updates to these should always be done through the UI provided (Data Dictionary / Data Administration / OE Console).
There are a subset of the metaschema which are exposed through
Virtual System Tables (VST). For further information refer to Article
What are Virtual System Tables (VST's) and when to run UPDATEVST In earlier Progress versions the _File and _Field metaschema tables that Progress/SQL-89 uses are documented in:
- PROGRESS 6: PROGRESS Programming Handbook, Section 15.4.6, "PROGRESS Schema Files"
- PROGRESS 7 and V8: PROGRESS SQL Guide and Reference, Appendix B, "PROGRESS Metaschema Tables"
- PROGRESS 9: PROGRESS SQL-89 Guide and Reference, Appendix B, "PROGRESS Metaschema Tables"
- Since OpenEdge 10 metaschema are no longer part of the Documentation sets.
- OpenEdge 12.1, Optimize the OpenEdge Database for High Availability, High Availability Improvements in 12.1
Optimize the OpenEdge Database for high availability, Change non-structural fields of _File and _Field online
There are never-the-less use-cases where querying the metaschema may be needed. For example building automated scripts for database administration tasks like tablemove or running CRC deployment checks. In all Progress and OpenEdge versions, metaschema tables with their associated fields and indexes can be viewed in the Data Dictionary:
- In the GUI Data Dictionary, enable View/Show Hidden Tables.
- In the character CHUI Data Dictionary, type the name of the metaschema table when prompted for a table name.
The following sample program uses the _File and _Field and _Index metaschema tables to query all the metaschema tables and their associated fields and indexes:
FOR EACH _File WHERE _file._tbl-type <> "T" NO-LOCK BY _file._file-name:
DISPLAY _File._File-num _File._File-Name.
FOR EACH _Field OF _File NO-LOCK BY _field._field-rpos:
DISPLAY _Field-Name _field._data-type _field._extent.
END.
FOR EACH _Index OF _file NO-LOCK:
IF AVAILABLE _Index THEN
DISPLAY _Index._Idx-num _Index._Index-name _Index._active.
END.
END.
To find the schema structure of a specific meta schema table:
DEFINE VARIABLE vIndexFlags AS CHARACTER NO-UNDO.
REPEAT WITH SIDE-LABELS ATTR:
PROMPT-FOR _file._file-name.
FIND _file USING _file-name NO-LOCK.
DISPLAY _file-name.
FOR EACH _field OF _file NO-LOCK:
DISPLAY
_field._field-name FORMAT "x(25)"
_field._data-type FORMAT "x(10)"
_field._initial LABEL "INIT" FORMAT "x(4)"
_field._format FORMAT "x(30)"
_field._label FORMAT "x(30)"
WITH NO-BOX WIDTH 150.
END.
FOR EACH _index OF _file NO-LOCK,
EACH _index-field OF _index NO-LOCK:
FIND _field OF _index-field NO-ERROR.
IF AVAILABLE (_field) THEN
ASSIGN vIndexFlags = (IF RECID(_Index) EQ _File._Prime-Index THEN "p" ELSE "")
+ (IF _Index._Unique THEN "u" ELSE "")
+ (IF _Index._Wordidx EQ 1 THEN "w" ELSE "").
DISPLAY
_index-Name FORMAT "X(15)"
_index-seq
vIndexFlags
_field-name FORMAT "X(30)"
WITH NO-BOX WIDTH 150.
END.
RELEASE _file.
END.