Try OpenEdge Now
skip to main content
Database Administration
Protecting Your Data : After-imaging : Managing after-imaging files : Monitoring AI file status
 
Monitoring AI file status
You must monitor the status of the AI extents. The AI extent status can be one of the following:
*Empty — When an AI extent is empty, it is available for use.
*Busy — When an AI extent is busy, it is currently in use.
*Full — When a busy AI extent fills up, an extent switch occurs: the state of the AI extent changes to full and the next AI extent becomes busy.
*Locked — When running OpenEdge Replication, a full extent is locked until the contents of the extent have been replicated to the target database. When the data is replicated, the extent is unlocked and marked Full.
*Archived — When running OpenEdge Replication, and AI File Management, an extent that was locked, and has been archived by the AI File Management utility, is marked as archived until OpenEdge Replication finishes replicating the extent. OpenEdge Replication will change the status of an archived extent to empty when the replication is finished.
There are three ways to determine the status of your AI files:
*RFUTIL AIMAGE EXTENT LIST
Use RFUTIL AIMAGE EXTENT LIST to display information about each extent, including status:
rfutil db-name -C aimage extent list
This command returns no information if after-imaging is disabled. For more information, see RFUTIL AIMAGE EXTENT LIST qualifier
*PROMON
Use PROMON > R&D > Status Displays > AI Extents to display information about each extent, including status. For example:
09/13/05 Status: AI Extents
15:28:44

Area Status Type File Size Extent Name
Number (KBytes)

13 BUSY Fix 1 505 /usr1/101A/docsample.a1
14 EMPTY Fix 0 505 /usr1/101A/docsample.a2
15 EMPTY Var 0 121 /usr1/101A/docsample.a3

Enter <return>, R, P, T, or X (? for help):
*RFUTIL AIMAGE QUERY
The AIMAGE QUERY qualifier to RFUTIL provides you with a tool to query the status of a specified AI extent. The output of AIMAGE QUERY is intentionally brief. For most queries, the result returned will be a single number or word. The output is designed to be easily incorporated into scripts for managing your after-imaging.
Use the following command to query an AI extent:
rfutil db-name -C aimage query query-option by search-option search-value
The query-option specifies the information you want to gather about the AI extent. The search-option specifies the how you are identifying the AI extent to query. The search-value specifies the match criteria for the search-option. For example, if you want to know when after-imaging started writing to a particular extent, identified by its sequence number, use the following command:
rfutil db1 -C aimage query startdate by sequence 1
The output returned is the date:
Wed May 26 15:06:49 2004
If you want all the information about an extent, specified by its name, use the following command:
rfutil db1 -C aimage query all by name db1.a1
The output returned is:
Extent: 1
Status: Busy
Type: Fixed Length
Path: /dbshare/databases/db1.a1
Size: 120
Used: 1
Start: Wed May 26 15:06:49 2004
Seqno: 1
For more complete syntax detains, including the query-option and search-option values, see RFUTILAIMAGE QUERY qualifier.
RFUTIL AIMAGE EXTENT FULL displays the filename of the oldest full file. You can then use this information to archive extents in the order in which they were filled. Although there might be multiple full files, this command displays the pathname of the oldest full file:
rfutil db-name -C aimage extent full
For more information, see the RFUTIL AIMAGE EXTENT FULL qualifier on page 1381.