Starting in OpenEdge Release 11.5, database parameters can be queried with the
_DbParams VST by their
_DbParams-Name or
_DbParams-Msg-Num values.
The
_DbParams VST should be used instead of the
_Startup VST from previous versions. (Note: The
_Startup VST was removed from the OpenEdge Database in OpenEdge 12).
Example 1: Specific Database Startup parameters can be queried by their _DbParams-Name
DEFINE VARIABLE cPmsgs AS CHARACTER NO-UNDO INITIAL
'-L,-B,-B2,-S,-blocksize'.
DEFINE VARIABLE ix AS CHAR NO-UNDO.
DEFINE VARIABLE ii AS INT NO-UNDO.
DO ii = 1 TO NUM-ENTRIES(cPmsgs):
ASSIGN ix = (entry(ii,cPmsgs)).
FOR FIRST _DbParams NO-LOCK WHERE _DbParams._DbParams-Name = ix.
IF AVAILABLE _DbParams THEN
DISPLAY _DbParams-Desc SKIP.
END.
END.
Example 2: Specific Database Startup parameters can be queried by their _DbParams-Msg-Num.
DEFINE VARIABLE cPmsgs AS CHARACTER NO-UNDO INITIAL '4239,17562,4241,4262'.
DEFINE VARIABLE ix AS INT NO-UNDO.
DEFINE VARIABLE ii AS INT64 NO-UNDO.
DEFINE TEMP-TABLE ttDBParams NO-UNDO LIKE _DbParams.
DO ii = 1 TO NUM-ENTRIES(cPmsgs):
ASSIGN ix = INTEGER(entry(ii,cPmsgs)).
FOR FIRST _DbParams NO-LOCK WHERE _DbParams._DbParams-Msg-Num = ix:
IF AVAILABLE _DbParams THEN
CREATE ttDBParams.
BUFFER-COPY _DBParams TO ttDBParams.
END.
END.
FOR EACH ttDBParams:
DISP ttDBParams._DbParams-Name ttDBParams._DbParams-value SKIP.
END.
Database Startup parameters that can be updated in PROMON can almost all be updated with the associated
_DbParams VST and the value change is applied (as long as it's valid).
Database Startup parameters that can be updated online with "PROUTIL -C increaseto" are typically not updatable with _DbParams.
The list of updatable
_DbParams can be found by reporting on the
_DbParams-Is-Modifiable field:
FOR EACH _Dbparams NO-LOCK WHERE _DbParams-Is-Modifiable = YES:
DISP _DbParams._DbParams-Name _DbParams-Is-Modifiable SKIP.
END.
Example 3: To change the updatable Database Client Notification poll time (-usernotifytime) with the _DbParams VST:
/* 1. Query the current value: */
FOR FIRST _DbParams NO-LOCK WHERE _DbParams._DbParams-Name = "-usernotifytime".
IF AVAILABLE _DbParams THEN
DISPLAY _DbParams-Desc _DbParams-Is-Modifiable SKIP.
/* 2. Update the current value: */
DO TRANSACTION:
FIND FIRST _DbParams WHERE _DbParams._DbParams-Name = "-usernotifytime".
ASSIGN _DbParams._DbParams-value = "3600". / * one hour * /
END.
- Use Database Client Notification (-usernotifytime) to specify how often a client polls the database to see if a schema change is in process.
- If no updates to schema are anticipated, due to index activation or rebuild, while the database is online, you can disable notification, or set the notification value to a very high number. If a change is required, the time between polls can be modified with PROMON or through the _DbParams VST.
- When the -usernotifytime value is changed from 0 to a non-zero value, currently connected clients will not observe the change until the previous value has expired on their session; only new clients will poll to receive the new polltime value.
- If the -usernotifytime is set to non-zero value then each client locks USR latch once per the -usernotifytime interval or once per 10 seconds if the -usernotifytime is less than 10 seconds which will cause USR latch contention. It should only be set to a low value when online schema changes are anticipated.
- For ABL clients the minimum usernotifytime is effectively 10 seconds.
This limit is imposed because the client could be a remote client connected to multiple databases, and the network IO could be significant in extreme cases while synchronizing within the client process.