Export Replica Schema (Data Management)

Summary

Creates a replica schema file with the schema of an input one- or two-way replica.

Usage

  • The output schema file must be in XML format. You must specify .xml as the file suffix.

  • Modifying the schema of a replica to match the schema of a relative replica is a separate process from data synchronization. Use the following tools for this purpose:

    • Use the Compare Replica Schema tool to generate an .xml file containing the schema changes.
    • Import the changes using the Import Replica Schema tool.
    • To apply replica schema changes, run the Export Replica Schema tool to export the schema of the replica with the changes to an .xml file. Then use the .xml file as input to the Compare Replica Schema tool.

  • This tool is used when synchronizing replica schema. Additionally, see the Compare Replica Schema and Import Replica Schema tools.

Parameters

LabelExplanationData Type
Export from Replica Geodatabase

The replica geodatabase from which the replica schema will be exported. The geodatabase can be a local or remote geodatabase.

Workspace; GeoDataServer
Output Replica Schema File

The file to which the replica schema will be exported.

File
Replica

The replica from which the schema will be exported.

String

arcpy.management.ExportReplicaSchema(in_geodatabase, output_replica_schema_file, in_replica)
NameExplanationData Type
in_geodatabase

The replica geodatabase from which the replica schema will be exported. The geodatabase can be a local or remote geodatabase.

Workspace; GeoDataServer
output_replica_schema_file

The file to which the replica schema will be exported.

File
in_replica

The replica from which the schema will be exported.

String

Code sample

ExportReplicaSchema example 1 (Python window)

import arcpy
arcpy.env.workspace = "C:/Data"
arcpy.management.ExportReplicaSchema("Countries.gdb", "replicaSchema.xml", "MyReplica1")
ExportReplicaSchema example 2 (stand-alone script)
# Name: ExportReplicaSchema_Example2.py
# Description: Export replica schema from a file geodatabase with a replica

# Import system modules
import arcpy

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

# Set local variables
replica_workspace = "Countries.gdb"
output_file = "replicaSchema.xml"
replica = "MyReplica1"

# Run ExportReplicaSchema
arcpy.management.ExportReplicaSchema(replica_workspace, output_file, replica)

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics