Compartir a través de


ErrTerm Function (CHKSGFILES)

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

Important

Storage groups are not available in Microsoft Exchange Server 2010. For backward compatibility with databases and storage groups in earlier versions of Exchange Server, the CHKSGFILES API includes the capability to specify storage groups. When you run CHKSGFILES against Exchange 2010 databases, you should set parameters that specify a storage group identifier to an empty string.

Vitual ERRErrTerm
(
    Const ULONGulFlags = NO_FLAGS
);

Parameters

  • ulFlags
    Optional input parameter. This value is reserved for future use. The value passed by this parameter should be 0 (zero).

Return Value

An error code from the ERR enumeration (ERR Enum (CHKSGFILES)).

Remarks

The CChkSGFiles object determines whether all of the databases registered with the ErrInit function were actually checked. This object uses the ErrCheckDbPages function to verify that the same number of database pages identified by the ErrCheckDbHeaders function were actually verified. 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 returns an error.

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

The CChkSGFiles object also determines whether the log files registered with ErrInit were actually checked. If not all of the logs were successfully checked, the ErrTerm function returns an error.

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

If you’re using CHKSGFILES in a multithreaded application, you must call the ErrTerm function in the single-threaded portion of the application, and you can call it no more than once for each CCheckSGFiles object. For more information, see Using CHKSGFILES in a Multithreaded Application in this SDK.

Requirements

Exchange 2010 only includes a 64-bit version of CHKSGFILES.

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