Checks the database for data integrity.
Syntax
ESS_FUNC_M EssValidateDB (hCtx, DbName, FileName);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
DbName | ESS_STR_T | Database name. Required, cannot be NULL. |
FileName | ESS_STR_T | Error log file name, to be placed in the app\db directory on the server. Required. |
Notes
This function runs the validation checks to ensure the integrity of the database.
Precede this call with a call to EssSetActive().
This function is asynchronous, so you must continue to call EssGetProcessState() until the validation process is finished.
This command validates the current database. You must select a database before issuing the EssValidateDB() command.
EssValidateDB() checks for data integrity in each block. Reading from top to bottom, the validation process goes through the entire database and checks blocks, sections, block type, and block length, and checks for validity in floating point numbers.
This command writes blocks and information about bad blocks to the log file.
If this command finds integrity errors, it writes validation process error messages to a text-format log file. The default location for the file is in the application\database directory; for example: %ARBORPATH%\APP\DB\VALIDATE.LST
The Essbase index contains an index for every data block. For every Read operation, this command automatically compares the index key in the index page with the index key in the corresponding data block and checks other header information in the block. If it encounters a mismatch, EssValidateDB() displays an error message and continues processing until it has checked the entire database
Return Value
None.
Access
This function requires the caller to have database designer privilege (ESS_PRIV_DBDESIGN) for the specified database.
Example
ESS_VOID_T ESS_ValidateDB (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_STR_T DbName; ESS_STR_T FileName; ESS_PROCSTATE_T pState; DbName = "Basic"; FileName = "D:\\AnalyticServices\\app\\sample\\basic\\Validate.lst"; sts = EssValidateDB (hCtx, DbName, FileName); if (!sts) { sts = EssGetProcessState (hCtx, &pState); while (!sts && (pState.State != ESS_STATE_DONE)) sts = EssGetProcessState (hCtx, &pState); } }
See Also