The oncheck utility reports on the state of an index and provides a means for a database system administrator to check on the state of objects in a database. You, as an access-method developer, can also use oncheck to verify that the access method creates and maintains appropriate indexes.
As Figure 30 shows, the database server calls only one access-method function for the oncheck utility. If necessary, the am_check purpose function can call am_open and am_close or can itself contain the appropriate logic to obtain handles, allocate memory, and release memory.