Kbase P23776: What is the BI file size relative to the BI Threshold (-bithold) size?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/08/2009 |
|
Status: Verified
GOAL:
What is the BI file size relative to the BI Threshold (-bithold) size?
FACT(s) (Environment):
Progress 9.x
FIX:
The following 4GL code reports the BI file size and the BI Threshold (-bithold) size.
DEFINE VARIABLE cDBLogFileInLine AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDBStatusLastOpen AS CHARACTER NO-UNDO.
DEFINE VARIABLE lDBStatusLastOpen AS LOGICAL NO-UNDO.
DEFINE VARIABLE dBIThresholdSize AS DECIMAL NO-UNDO.
DEFINE VARIABLE dLogingBiLogSize AS DECIMAL NO-UNDO.
FIND FIRST _DBStatus NO-LOCK NO-ERROR.
FIND FIRST _Logging NO-LOCK NO-ERROR.
ASSIGN cDBStatusLastOpen = _DBStatus._DBStatus-LastOpen
dLogingBiLogSize = _Logging._Logging-BiLogSize
lDBStatusLastOpen = FALSE.
INPUT FROM VALUE(DBNAME + ".lg").
REPEAT:
IMPORT UNFORMATTED cDBLogFileInLine.
IF INDEX(cDBLogFileInLine, cDBStatusLastOpen) GT 0 THEN
ASSIGN lDBStatusLastOpen = TRUE.
IF lDBStatusLastOpen AND INDEX(cDBLogFileINLine, "-bithold") GT 0 THEN
DO:
ASSIGN dBIThresholdSize = DECIMAL(ENTRY(10,cDBLogFileInLine," ")) * 1024.
LEAVE.
END.
END.
INPUT CLOSE.
IF dBIThresholdSize = 0 THEN
MESSAGE "The Bi File Size Now Is" dLogingBiLogSize "KB. "
"The Recovery Log Threshold Size Parameter (-bithold) Is Not Set"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE "The Bi File Size Now Is" dLogingBiLogSize "KB Which Is"
INTEGER(100 * dLogingBiLogSize / dBIThresholdSize)
"Percent Of The Recovery Log Threshold Size Set To" dBIThresholdSize
VIEW-AS ALERT-BOX INFO BUTTONS OK.