Compartir a través de


ErrCheckDbHeaders Function (CHKSGFILES)

The ErrCheckDbHeaders function validates the headers of the database files that were specified by the ErrInit function. This function also returns the page size and number of pages in each of the specified databases.

Important

Storage groups are not available in Microsoft Exchange Server 2010. For backward compatibility 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 ERRErrCheckDbHeaders 
(
        ULONG * const pcbDbPageSize,
        ULONG * const pcHeaderPagesPerDb,
        ULONG  const piDbErrorEncountered,
    Const ULONGulFlags = NO_FLAGS
);

Parameters

  • pcbDbPageSize
    Output parameter. The page size of each of the specified databases, in bytes.

  • pcHeaderPagesPerDb
    Output parameter. The number of pages at the beginning of each specified database that are reserved by the database engine for internal use. Note that you should not pass header pages to the ErrCheckDbPages function for validation.

  • piDbErrorEncountered
    Output parameter. If the return value of the function indicates an error, this parameter will be an index into the rgwszDb[] array passed to the ErrInit function. The indexed array element represents the database in which the error was encountered. If the function does not return an error value, this parameter value is invalid.

  • 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) enumeration.

Remarks

ErrCheckDbHeaders verifies that all databases registered with ErrInit have the same log signature and database page size. You can also use the lowest genMin value and the highest genMax value to determine the set of log files that are necessary to bring all of the registered databases to a clean-shutdown state.

The piDbErrorEncountered parameter is set only when an error is detected, as indicated by a non-zero ErrCheckDbHeaders return value.

When an error occurs in this function, an error event will be added to the Windows Error event log.

You can call ErrCheckDbHeaders only after calling ErrInit, and you must call it before calling ErrCheckDbPages and ErrCheckLogs.

If you’re using CHKSGFILES in a multithreaded application, you must call the ErrCheckDbHeaders function in the single-threaded portion, and you can call it only 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.