Salesforce

How to check if the AI Archiver is running?

« Go Back

Information

 
TitleHow to check if the AI Archiver is running?
URL NameP126848
Article Number000128003
EnvironmentProduct: OpenEdge
Version: 10.1x, 10.2x, 11.x, 12.x
OS: All Supported Operating Systems
Other: AIMGT
Question/Problem Description
How to check if the AI Archiver is running?
How to check if the aiarchiver is running?
How to query if the AI management is running?
How to tell if the AIMGT daemon is running using an ABL query?
How to verify the AIMGT deamon state from the cmd line?

 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
If the AI archiver daemon is not running all AI files can become FULL which would cause some functionality like a backup to fail as there won't be empty AI file to switch to, example of errors:

(3775) Can't switch to after-image extent %s it is full.
(8563) %r!!! ERROR - Database backup utility FAILED !!! 

At the OS level, when the archiver is running there should be a "_mprshut <dbname> -C aigmt" process running. 

There should also be a log called <dbname>.archival.log

The following ABL code provides an example to verify if the AI Archiver is active for a database. The code queries the _Connect VST table to find if the AI Archiver "AIMD" is connected to shared memory.

Caveats:
  • Querying the AIMGT daemon interval is important and relies on an 'action item' when failure occurs which would be to investigate current situation.
  • An archiving interval of at least = (number of ai files -2) x aiarcinterval.  This would allow "aiarcinterval x 2" time to react before exhausting available ai files. (Your mileage may vary).
  • If multiple databases are connected, then the logical database name would need to be parsed / added to the code below.
  • There is no consideration for LOCKED ai extents 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.

In OpenEdge 11.3, "proutil dbname -C describe" can be used to see if the AI archiver has been enabled for a database and what the mode the ai files are being archived in (On Demand or Timed), which confirms that the AI daemon is active.  In prior versions, the "proutil dbname -C describe" utility lists the features that are currently enabled and active for the database, where the Yes in the "Active" column indicates that the feature is active not that the daemon is running (as for OpenEdge 11.3), the archiving mode is not reported under the "Details" column.

If the AI Archiver feature has been enabled, but the database is not running, the output from proutil dbname -C describe will show:

Database Features

   ID   Feature                            Active  Details
  ----  ---------------------------------  ------  -------
     8  After Image Management/Archiver    Yes


Note: If this entry is not in the output at all, either the archiver was never enabled on the db or at some point was disabled and needs to be reenabled.  How to enable automated AI File Management (AIMGT)?

This does not mean that the Archiver is currently archiving files.  This means the daemon is active in that the feature is active and has been enabled to start with the database.  

Once the database is started multi-user with the -aiarcdir and -aiarcinterval (120 seconds in the example) database startup parameters, the PROUTIL describe option will show the following:

Database Features

ID   Feature                               Active  Details
  ----  ---------------------------------  ------  -------
     8  After Image Management/Archiver    Yes     Timed 120


If the database is stopped, the AI Archiver will still show as being enabled as above, but it will not be actively archiving any ai files as the database server is not running.  The deamon does not run offline.

Database Features

   ID   Feature                            Active  Details
  ----  ---------------------------------  ------  -------
     8  After Image Management/Archiver    Yes


When the database is restarted with the -aiarcdir (ai archive directory) parameter without an -aiarcinterval (ai archive interval) the PROUTIL describe option will show:

Database Features

  ID   Feature                             Active  Details
  ----  ---------------------------------  ------  -------
     8  After Image Management/Archiver    Yes     On-demand 0


The screen scrapes shown above will be populated with the current information regardless if the database was started with the -aiarcdir, -aiarcinterval database startup parameters or RFUTIL is used to reset the -aiarcdir and -aiarcinterval when the database is already running.

Starting with OpenEdge 10.1B, the After Image Management/Archiver correlates to the _DataBase-Feature VST WHERE _DBFeature-ID = 8
However while the _DBFeature_Active = '1' is set when enabled, it does not indicate that it is running (as outlined above), the same output will show if queried online or offline, the status of the daemon is not available. If ABL code is prefered, then the ABL example above using the _Connect VST can be customised to requirements.

 
Workaround
Notes
References to Other Documentation: 

OpenEdge Data Management: Database Administration - Protecting your Data: After-imaging

Progress Article: 

How to manage the aiarchiver daemon online

    
Keyword Phrase
Last Modified Date2/8/2024 6:52 PM

Powered by