Export Data Change Message (Data Management)

Summary

Creates an output delta file containing updates from an input replica.

Usage

  • The geodatabase can be a local geodatabase or a geodata service.

  • The output delta file can be a delta file geodatabase (.gdb) or a delta XML file (.xml). When specifying the output delta file, you must include the appropriate suffix (.gdb or .xml).

  • Use this tool when synchronizing a replica while disconnected. First run the Export Data Change Message tool, which creates a delta file with changes to synchronize. Then copy and import the delta file to the relative replica using the Import Message tool. If the delta file gets lost and you want to resend, use the Re-Export Unacknowledged Messages tool to regenerate the delta file. After the changes are imported, you can export an acknowledgment file from the relative replica using the Export Acknowledgement Message tool. Copy and import the acknowledgment file using the Import Message tool. If the acknowledgment is not received, the next time changes are sent, they will include the new changes and the previously sent changes.

  • To synchronize replicas in a connected mode, see the Synchronize Changes tool.

Parameters

LabelExplanationData Type
Export from Replica Geodatabase

The replica geodatabase from which the data change message will be exported. The geodatabase can be local or remote.

Workspace;GeoDataServer
Output Data Changes File

The output delta file.

File
Replica

The replica containing the updates to be exported.

String
Switch to Receiver once the message has been exported

Specifies whether the replica role will be changed from a sender to a receiver. The receiver may not send replica updates until updates from the relative replica sender arrive.

  • Unchecked—The replica role will not be changed. This is the default.
  • Checked—The replica role will be changed from a sender to a receiver.
Boolean
Include unacknowledged data changes

Specifies whether data changes that were previously exported for which no acknowledgment message was received will be included.

  • Unchecked—Data changes that were previously sent will not be included.
  • Checked—All data changes that were previously exported for which no acknowledgment message was received will be included. This is the default.
Boolean
Include new data changes since last export

Specifies whether all data changes made since the last exported data change message will be included.

  • Unchecked—Data changes made since the last exported data change message will not be included.
  • Checked—All data changes made since the last exported data change message will be included. This is the default.

Specifies whether all data changes made since the last exported data change message will be included.

  • NO_NEW_CHANGESData changes made since the last exported data change message will not be included.
  • NEW_CHANGESAll data changes made since the last exported data change message will be included. This is the default.
Boolean

arcpy.management.ExportDataChangeMessage(in_geodatabase, out_data_changes_file, in_replica, switch_to_receiver, include_unacknowledged_changes, include_new_changes)
NameExplanationData Type
in_geodatabase

The replica geodatabase from which the data change message will be exported. The geodatabase can be local or remote.

Workspace;GeoDataServer
out_data_changes_file

The output delta file.

File
in_replica

The replica containing the updates to be exported.

String
switch_to_receiver

Specifies whether the replica will be changed from a sender to a receiver. The receiver may not send replica updates until updates from the relative replica sender arrive.

  • DO_NOT_SWITCHThe replica role will not be changed. This is the default.
  • SWITCHThe replica role will be changed from a sender to receiver.
Boolean
include_unacknowledged_changes

Specifies whether data changes that were previously exported for which no acknowledgment message was received will be included.

  • NO_UNACKNOWLEDGEDData changes that were previously sent will not be included.
  • UNACKNOWLEDGEDAll data changes that were previously exported for which no acknowledgment message was received will be included. This is the default.
Boolean
include_new_changes

Specifies whether all data changes made since the last exported data change message will be included.

  • NO_NEW_CHANGESData changes made since the last exported data change message will not be included.
  • NEW_CHANGESAll data changes made since the last exported data change message will be included. This is the default.
Boolean

Code sample

ExportDataChangeMessage example 1 (Python window)

The following Python window script demonstrates how to use the ExportDataChangeMessage function in the Python window.

import arcpy
arcpy.env.workspace = "C:/Data"
arcpy.management.ExportDataChangeMessage("MySDEdata.sde", "Changes.gdb", 
                                         "MyReplica1", "SWITCH", "TRUE", "TRUE")
ExportDataChangeMessage example 2 (stand-alone script)

The following Python script demonstrates how to use the ExportDataChangeMessage function in a stand-alone script.

# Name: ExportDataChangesMessage_Example2.py
# Description: Export a data change message to a delta file geodatabase (.gdb).

# Import system modules
import arcpy

# Set workspace
arcpy.env.workspace = "C:/Data"

# Set local variables
in_geodatabase = "MySDEdata.sde"
out_dataChanges = "Changes.gdb"
replica_name = "MyReplica1"
switch_directions = "SWITCH"
acknowledge = "TRUE"
new_changes = "TRUE"

# Run ExportDataChangeMessage
arcpy.management.ExportDataChangeMessage(in_geodatabase, out_dataChanges, 
                                         replica_name, switch_directions, 
                                         acknowledge, new_changes)

Related topics