Consultor Eletrônico



Kbase P126848: How to check if the AI Archiver is running?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/1/2008
Status: Verified

GOAL:

4GL: How to check if the AI Archiver is running using 4GL?

GOAL:

How to check if the AI Archiver is running?

GOAL:

How to query if the AI management is running ?

GOAL:

How to tell if the AIMGT deamon is running with 4GL

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1x
OpenEdge 10.2x

FIX:

There is currently no functionality to check if the AIMGT deamon is running. The following 4GL example, querying the _Connect table could be customised for the ai archiving enabled database(s).

CAVEATS:
1. Querying the AIMGT deamon interval is important and relies on an 'action item' when failure occurs: viz: investigate current situation.
We Suggest at least at interval = (number of ai files -2) x aiarcinterval. This would allow "aiarcinterval x 2" time to react before exhausting available ai files. (YMMV)

2. If multiple databases are connected to, then the logical database name would need to be parsed to the proceedure.
3. No consideration for LOCKED ai exents for replication-enabled databases with ai archiving enabled.

From OpenEdge 10.1A and higher, the _Connect table can be queried as follows:
DEFINE VARIABLE dtCurrent AS DATETIME-TZ NO-UNDO.
DEFINE VARIABLE lRunning AS LOGICAL NO-UNDO.
DEFINE VARIABLE iloop AS INTEGER INIT 1 NO-UNDO.
OUTPUT TO "aialive.out".

DO iloop = 1 TO 24: /* 24 hours */
dtCurrent = NOW.
FOR EACH _connect NO-LOCK WHERE _Connect-Type <> ?:
IF _Connect-Type = "AIMD" THEN DO:
lRunning = TRUE.
LEAVE.
END.
END.
IF lRunning THEN

PUT UNFORM dtCurrent " >ACK: The AI Archiver is Running " iloop SKIP.
ELSE
PUT UNFORM dtCurrent " STOP: AI Archiver is NOT Running " iloop SKIP.
PAUSE 3600 NO-MESSAGE.
END.
OUTPUT CLOSE.