EsbValidateDB
Description
EsbValidateDB() validates the integrity of the database.
Syntax
EsbValidateDB (hCtx, DbName, FileName)
ByVal hCtx As Long
ByVal DbName As String
ByVal FileName As String
Parameters
hCtx | Essbase API context handle. |
DbName | Database name. Required, cannot be NULL.
|
FileName | Error log file name, to be placed in the app\db directory on the server. Required.
|
Return Value
None.
Notes
- This function runs validation checks to ensure the integrity
of the database.
- This command validates the current database. You must select
a database before issuing the EsbValidateDB() command.
- EsbValidateDB() 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:
ESSBASE\APP\DB\VALIDATE.LST
- Precede this call with a call to EsbSetActive().
- This function is asynchronous, so you must continue to call
EsbGetProcessState() until the validation process is finished.
- 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 enItemsers a mismatch, EsbValidateDB() displays
an error message and continues processing until it has checked
the entire database.
Access
This function requires the caller to have Database Design privilege
(ESB_PRIV_DBDESIGN) for the specified database.
Example
Declare Function EsbValidateDB Lib "ESBAPIW" (ByVal hCtx As Long, ByVal DbName As String, ByVal FileName As String) As LongSub ESB_ValidateDB()
Dim sts As Long
Dim DbName As String
Dim FileName As String
Dim ProcState As ESB_PROCSTATE_T
DbName = "Basic"
FileName =
"D:\Essbase\App\Sample\Basic\Validate.lst"
sts = EsbValidateDB(hCtx, DbName, FileName)
If Not sts Then
'*************************************
'Check process state until it is done
'*************************************
sts = EsbGetProcessState(hCtx, ProcState)
Do While sts = 0 And ProcState.State =
ESB_STATE_INPROGRESS
sts = EsbGetProcessState(hCtx, ProcState)
Loop
End If
End Sub
See Also
EsbSetActive()
EsbGetProcessState()