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);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

pSelectVerify

ESS_PARTSLCT_VALIDATE_T

Description of the partition to verify.

pulInvalidComponent

ESS_PULONG_T

Number of errors and warnings resulting from validation.

ppInvalidComponent

ESS_PARTDEF_INVALID_T

List of errors and warnings resulting from validation.

pRemoteDDBFileName

ESS_STR_T

Remote server partition definition file name.

Notes

Return Value

Returns zero if successful; error code if unsuccessful.

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