Share via


ErrTerm Function (CHKSGFILES)

Topic Last Modified: 2006-11-29

The ErrTerm function provides an overall status of the database and log verification, indicating whether all the database pages and logs were successfully verified.

Syntax

Vitual ERR ErrTerm
(
    Const ULONG ulFlags = NO_FLAGS
);

Parameters

  • ulFlags
    Optional input parameter. This value is reserved for future use. The value passed should be zero.

Return Value

This function returns an error code from the ERR Enum (CHKSGFILES).

Remarks

The CChkSGFiles instance tracks whether all the databases registered with ErrInit were actually checked. The instance checks that the same number of database pages indicated by ErrCheckDbHeaders were actually verified using ErrCheckDbPages. If the correct number of pages in each database are not successfully checked, the ErrTerm function returns an error.

If the number of database pages checked with ErrCheckDbPages is less than that indicated by ErrCheckDbHeaders, this function creates an error in the Windows Event log, and ErrTerm will return an error.

If the number of database pages checked with ErrCheckDbPages is more than that indicated by ErrCheckDbHeaders, this function creates a warning in the Windows Event log to indicate the application might be unnecessarily checking some database pages more than once. However, ErrTerm will in this case return success.

The CChkSGFiles instance also tracks whether the log files registered with ErrInit were actually checked. If all the logs were not successfully checked, the ErrTerm function will return an error.

When ErrTerm returns an error, it will be the first error it finds, even though ErrTerm checks the verification status for all databases registered with ErrInit.

Requirements

When calling this API on a computer where the Exchange Server 2007 Administrative Tools role is installed on Microsoft Windows XP, use the 32-bit version of this API.

When calling this API on a computer when Exchange Server 2007 is installed on a 64-bit version of Windows, use the 64-bit version of this API.

The account that the application is running under must have read access permissions to the database and log files to be checked.