The non-structural fields of the _File and _Field tables may now be changed while the database remains running. Such changes no longer require an exclusive schema lock.

Note: During the short period of time that the schema change transaction is in process, new database logins and schema readers will be blocked until the transaction completes.
The following table lists the non-structural fields that you can change online without disrupting user experience:
Table 1. Non-structural fields that can be changed online
Schema Table Field/Column Name
_Field _Field._Col-label-SA
_Field _Field._Col-label
_Field * _Field._Fld-case
_Field _Field._Format-SA
_Field _Field._Format
_Field _Field._Help-SA
_Field _Field._Help
_Field _Field._Label-SA
_Field _Field._Label
_Field * _Field._Valexp
_Field _Field._Valmsg-SA
_Field _Field._Valmsg
_Field _Field._View-As _Field._Width
_File _File._File-Label-SA
_File _File._File-Label
_File * _File._Valexp
_File _File._Valmsg-SA
_File _File._Valmsg

Effect on ABL applications

Unless users recompile their r-code, they will not see the effect of changes to non-structural fields.

For example, if an r-code is compiled before the column label is changed, then the old column label continues to appear until the r-code is recompiled. This does not affect how the business logic executes.

A recompilation of the r-code might be necessary for any changes to fields marked with an asterisk (*). If an affected field is referenced in the r-code, the r-code may execute differently. In this instance, any ABL application logic (r-code) that references these changed fields must be recompiled.

For example, if you modify the Valexp field in the _Field schema table, the AVM continues to execute the older validation expression until the r-code that accesses the database is recompiled.

Effect on transactional concurrency

The support for online changes to non-structural fields has the following effects on the concurrency of database transactions:
  • Changing non-structural fields in the _File and _Field tables do not require exclusive access to the database.
  • Concurrent schema transactions are not allowed.
  • During the short period of time that the schema change transaction is in process, new database logins and schema readers will be blocked until the transaction completes.

Options to change the schema fields

You can change fields in the _File and _Field schema tables using any one of the following options:
  • Make the change in a development database and then load the delta.df file into the schema online using the data dictionary tool. Be sure to check the Add new objects on-line box.
  • Use ALTER TABLE or ALTER COLUMN (in OpenEdge SQL)
  • Update the schema directly using ABL, as in the example below

Example

The following is an example of changing the label of the column to Customer Number using ABL:
SESSION:SCHEMA-CHANGE = “NEW OBJECTS”.
FIND FIRST _File WHERE _File-name='customer'.
FIND FIRST _Field WHERE _File-Recid = RECID(_File) 
and _Field-Name='custNum'.
ASSIGN _Col-Label='Customer Number'.

The following is an example of changing the label of the custNum column to Customer Number using SQL:

ALTER TABLE Pub.Customer ALTER COLUMN CustNum SET PRO_COL_LABEL ‘Customer Number’;
ALTER TABLE Pub.Customer ALTER COLUMN CustNum SET PRO_COL_LABEL ‘Customer Number’;

Notes

  • Non-structural fields do not affect the structure of the associated database tables when changed.