EsbValidateDB

Validates the integrity of the database.

Syntax

EsbValidateDB (hCtx, DbName, FileName)
ByVal hCtx     As Long
ByVal DbName   As String
ByVal FileName As String
ParameterDescription

hCtx

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.

Notes

Return Value

None.

Access

This function requires the caller to have Database Manager privilege (ESB_PRIV_DBDESIGN) for the specified database.

Example

Declare Function EsbValidateDB Lib "ESBAPIN" (ByVal hCtx As Long, ByVal DbName As String, ByVal FileName As String) As Long

Sub 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