Salesforce

How to enable automated AI File Management (AIMGT)?

« Go Back

Information

 
TitleHow to enable automated AI File Management (AIMGT)?
URL Namehow-to-enable-automated-ai-file-management
Article Number000165727
EnvironmentProduct: OpenEdge
Version: 10.1x, 10.2x, 11.x, 12.x
OS: All Supported Operating Systems
Other: AI File Management, AIMGT, AI Archiver
Question/Problem Description
What is the AI File Management Feature ?
How do I enable automated AI File Management instead of using RFUTIL scripts ?
What commands enable, suspend, manage and stop AI File Management?
Are additional steps required for unattended after-image file archiving and availability ?
How to enable a database to use the AI Archiver (AIMGT) process?
What aiarchiver parameters need to be added to database startup ?
Can the AIMGT daemon be enabled online?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution

What is the AI File Management Feature ?

It is not the intent of this Article to repeat OpenEdge Documentation on the subject. It summarises and provides a quick reference to make use of this feature.
Manage the OpenEdge Database, After-imaging, AI File Management utility - Enabling your database for automated AI file management

AI File Management : A Brief Summary

  • The After-Imaging (AI) File Management (AIMGT) feature was first included with the Enterprise database license in OpenEdge 10.1A.
  • The AIMGT feature allows the management of After Image files while the database is online, without the need to script RFUTIL utilities.  
  • Once the OpenEdge database has been enabled for archiving, the AIMGT daemon creates an archive of FULL AI extents to the current archive directory, (-aiarcdir) according to the archive interval (-aiarcinterval or aiarchiver setinterval) before marking these as EMPTY for re-use.  
  • For OpenEdge Replication enabled databases, any LOCKED extents are archived and are not marked EMPTY but ARCHIVED - until their transaction notes have been fully applied to the target database(s), at which time the AIMGT daemon marks these as EMPTY for re-use as they are already backed up to the  archive directory.
  • An archival log file is written to the same directory as your database .db where an entry corresponding to each archived file is written once the archival process completes (<dbname>.archival.log).

How to enable a database to use the AI Archiver (AIMGT) process?

The AI File Management database feature is an AIMGT daemon, that first needs to be enabled and initialized with required configuration parameters once After-Imaging is enabled:

1.  Review AI Files

Ensure that the database has after-imaging extents added to it's database structure and if after-imaging is enabled:
$   prostrct list <dbname> <dbname>.st
$   proutil <dbname> -C describe

If changes to the existing ai extent structure require offline operations, such as removing ai extents or ai sequence re-ordering, this feature can then be enabled with an online probkup once the database is restarted (as described below), or enabled offline at the same time:
$   rfutil <dbname> -C mark backedup
$   rfutil <dbname> -C aimage begin  # If required
$   rfutil <dbname> -C aiarchiver enable
$   proutil <dbname> -C enablesitereplication source # If after-imaging had to be enabled
$   Re-start the database with the new archive directory and archive interval parameters described below, then take an online probkup as the earliest opportunity

Changing the aiblocksize requires after-imaging to be disabled then re-enabled.  This operation can be carried out online where subsequently enabling AI online (probkup online enableai) automatically sets ai block size to be the same as bi block size. This method is described in Article: Once AIMGT is enabled, should after-imaging ever need to be disabled online (aimage aioff) this breaks the AI Archiver's sequencing in versions prior to 11.7.5. Further details are provided in Article:

2. Enable the AI Archiver and initialize the AIMGT Daemon Online

a.  Create directories with sufficient space for the AIMGT daemon to archive AI extents

While AI files will be managed when the database is online to the current -aiarcdir, periodic archive/purge of these files will still need to be managed in line with site-specific database backup retention policies.

b. Enable the AI Archiver feature and initialise the AIMGT Daemon online:
  • Since OpenEdge 10.1B, both AI (After Imaging) and the AI Archiver can be enabled online with the PROBKUP utility
  • Enabling after imaging and or AI Archiver features online can be carried out concurrently or singularly as needed.
  • This will result in an online database backup which can be used for roll-forward hotspare DR databases
  • Enabling AI online (enableai) automatically sets ai block size to be the same as the current bi block size 
Example 1:  Enable AI and AIMGT at the same time, then start the AIW
           
$   probkup online <dbname> <dbname>.bak enableai enableaiarchiver -aiarcdir <dir1>,<dir2> [ -Bp 32 -com -vs 250000  -aistall < $BKFILEVOLS ]
$   proaiw <dbname>
  • On Windows Platforms a limit of 9 parameters that can be passed to the PROBKUP command line, where an easy workaround is provided in the following Article:
  • Optionally the nul-bit-bucket can be used for the backup volume (/dev/null on UNIX or NUL on Windows), in which case there is no backup volume created. This is a useful technique when only AIMGT needs to be enabled and a previous backup since AI was enabled is available for roll-forward needed.
Example 2:  Enable only AIMGT without a backup volume created
             
$   probkup online <dbname> NUL enableaiarchiver -aiarcdir <dir1>,<dir2> -Bp 32

3.   Add AI file management database startup parameters

Whether the database is enabled for AI Management online or offline, the primary broker will need to include supporting startup parameters.
  • The -aistall parameter will be automatically be set to enabled while the ai archiver is enabled, this is a requirement. 
  • -aiarcdir = /dir/dir,/dir/dir  are the primary directory and non-mandatory secondary archive directories (mandatory)
  • -aiarcdircreate = to create the directory if it does not exist (optional)
  • -aiarcinterval sets the mode the deamon archives when AIMGT initialises at database startup (optional):
  1. On Demand mode, is set when this startup parameter is not used.  The AIMGT deamon does not switch extents and only archives ai extents as soon as they are eligible. For example: RFUTIL -C aimage new, or automatically switched as part of another utility such as an online PROBKUP or PROQUIET enable.  This is further clarified in Article  How to start an aiarchiver enabled database in on-demand mode ?  
  2. Timed mode= IntegerValue [120 ... 86,400 seconds] The AIMGT deamon will switch the current BUSY extent at this time-interval. If ai extents are switched for any other reason before this interval, they will be archived at the time they were marked FULL or LOCKED
  3. The current mode or timed-interval can be changed online as long as the deamon is running. For example, changing the timed-mode to on-demand which is useful when running low on available ai capacity in order to maximise the remaining files space:
$   proserve <dbname> [parameters] -aiarcdir /usr1/aiarchives/,/usr2/aiarchives/ -aiarcdircreate -aiarcinterval 1440
$   rfutil <dbname> -C aiarchiver setinterval 0
 

4. Monitor and Manage the AIMGT Feature: 

 
Workaround
Notes
Keyword Phrase
Last Modified Date2/16/2022 2:55 PM

Powered by