Label | Explanation | Data 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.
| Boolean |
Include unacknowledged data changes | Specifies whether data changes that were previously exported for which no acknowledgment message was received will be included.
| Boolean |
Include new data changes since last export | Specifies whether all data changes made since the last exported data change message will be included.
Specifies whether all data changes made since the last exported data change message will be included.
| Boolean |
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
arcpy.management.ExportDataChangeMessage(in_geodatabase, out_data_changes_file, in_replica, switch_to_receiver, include_unacknowledged_changes, include_new_changes)
Name | Explanation | Data 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.
| Boolean |
include_unacknowledged_changes | Specifies whether data changes that were previously exported for which no acknowledgment message was received will be included.
| Boolean |
include_new_changes | Specifies whether all data changes made since the last exported data change message will be included.
| Boolean |
Code sample
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")
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)