# EssPartitionValidateDefinition

Description

EssPartitionValidateDefinition() verifies the local partition definition (specified by ESS_PPARTSLCT_VALIDATE_T) against the corresponding partition definition in pRemoteDDBFilename on the remote server.

Syntax

    ESS_FUNC_M EssPartitionValidateDefinition (hCtx, pSelectVerify,
    pulInvalidComponent, ppInvalidComponent, pRemoteDDBFileName);

ESS_HCTX_T | hCtx
ESS_PPARTSLCT_VALIDATE_T | pSelectVerify
ESS_PULONG_T | pulInvalidComponent
ESS_PPPARTDEF_INVALID_T | ppInvalidComponent
ESS_STR_T | pRemoteDDBFileName

Parameters

hCtx | Essbase API context handle.
pSelectVerify | Description of the partition to verify.
pulInvalidComponent | Number of errors and warnings resulting from validation.
ppInvalidComponent | List of errors and warnings resulting from validation.
pRemoteDDBFileName | Remote server partition definition file name.

Return Value

Returns zero if successful; error code if unsuccessful.

Notes

- Call the function EssFree() to free the invalid component when pulInvalidComponent is not 0.
- The remote partition definition file can reside locally or on the remote host. If the partition definition file is local, pRemoteDDBFileName must specify the full path, including the file name with extension. If the partition definition file is remote, pRemoteDDBFileName must specify the file name without extension (the extension is assumed to be .DDB).
- The server uses the following rule to find the partition definition file on the system:
  - If pSelectVerify->pszFileName = DbName, the server looks for DbName.DDN.
  - If pSelectVerify->pszFileName != DbName, the server looks for pSelectVerify->pszFileName.DDB.

Access

A call to this function requires database designer access privileges.

Example

    ESS_STS_T  ESS_PartitionValidateDefinition(ESS_HCTX_T hCtx, ESS_HINST_T hInst)
    {
       ESS_STS_T      sts = 0;
       ESS_PARTSLCT_VALIDATE_T   SelectVerify;
       ESS_PARTDEF_INVALID_T    *pInvalidComponent;
       ESS_ULONG_T               ulInvalidComponentCount = 0;
       ESS_STR_T                 pRemoteDDBFileName = "src";

       /* assume, logged into target database  */

       memset(&SelectVerify, 0, sizeof(ESS_PARTSLCT_VALIDATE_T));
       SelectVerify.usLoc                         = ESS_FILE_SERVER;
       SelectVerify.pszFileName                   = "trg";
       SelectVerify.Part.usType                   = ESS_PARTITION_OP_REPLICATED;
       SelectVerify.Part.usDirection              = ESS_PARTITION_DATA_TARGET;
       SelectVerify.Part.HostDatabase.pszHostName = "Local"
       SelectVerify.Part.HostDatabase.pszAppName  = "PartSrc";
       SelectVerify.Part.HostDatabase.pszDbName   = "Src";

    sts = EssPartitionValidateDefinition (hCtx, &SelectVerify,
           &ulInvalidComponentCount, &pInvalidComponent, pRemoteDDBFileName);

      if (ulInvalidComponentCount > 0)
          printf("Validation resulted in warnings and errors.\n");
       else
          printf ("Partition is valid.\n");

       if (pInvalidComponent)
          EssFree(hInst, pInvalidComponent);

     return(sts);
    }

See Also

Constant and Structure Definitions for Partitions
EssPartitionApplyOtlChangeFile()
EssPartitionApplyOtlChangeRecs()
EssPartitionCloseDefFile()
EssPartitionFreeDefCtx()
EssPartitionFreeOtlChanges()
EssPartitionGetAreaCellCount()
EssPartitionGetList()
EssPartitionGetOtlChanges()
EssPartitionGetReplCells()
EssPartitionNewDefFile()
EssPartitionOpenDefFile()
EssPartitionPurgeOtlChangeFile()
EssPartitionPutReplCells()
EssPartitionReadDefFile()
EssPartitionReadOtlChangeFile()
EssPartitionReplaceDefFile()
EssPartitionResetOtlChangeTime()
EssPartitionValidateLocal()
EssPartitionWriteDefFile()