# EssPartitionResetOtlChangeTime

Description

EssPartitionResetOtlChangeTime() takes the "last change" time from the source partition and assigns it as a "last meta change" time of a destination partition.

Syntax

    ESS_FUNC_M EssPartitionResetOtlChangeTime (hCtx, pSourcePartition, pDestinationPartition);

ESS_HCTX_T | hCtx
ESB_PPART_DEFINED_T | pSourcePartition
ESB_PPART_DEFINED_T | pDestinationPartition

Parameters

hCtx | Essbase API context handle.
pSourcePartition | Partition for the new time.
pDestinationPartition | Partition where the time is reset.

Return Value

Returns zero if successful; error code if unsuccessful

Notes

- The source partition refers to a partition that provides a time stamps and target partition refers to a partition which receives the time stamp.
- A source partition does not have to be either a data source partition or an outline source partition.

Access

A call to this function requires database designer access privileges.

Example

    ESS_FUNC_M ESS_PartitionResetOtlChangeTime(ESS_HCTX_T  hCtx)
    {
       ESS_FUNC_M			sts;
       ESS_PART_DEFINED_T SourcePartition, TargetPartition;
       memset(&SourcePartition, 0, sizeof(ESS_PART_DEFINED_T));
       memset(&TargetPartition, 0, sizeof(ESS_PART_DEFINED_T));

       SourcePartition.HostDatabase.pszHostName = "local";
       SourcePartition.HostDatabase.pszAppName = "App1";
       SourcePartition.HostDatabase.pszDbName = "Src1";
       SourcePartition.usType = ESS_PARTITION_OP_LINKED;
       SourcePartition.usDirection = ESS_PARTITION_DATA_SOURCE;

       TargetPartition.HostDatabase.pszHostName = "local";
       TargetPartition.HostDatabase.pszAppName = "App1";
       TargetPartition.HostDatabase.pszDbName = "Trg1";
       TargetPartition.usType = ESS_PARTITION_OP_LINKED;
       TargetPartition.usDirection = ESS_PARTITION_DATA_TARGET;

       sts = EssPartitionResetOtlChangeTime (hCtx, &SourcePartition, &TargetPartition);
       printf("EssPartitionResetOtlChangeTime   sts: %ld\n",sts);
       return(sts);

    }

See Also

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