Compare Replica Schema (Data Management)

License Level:BasicStandardAdvanced

Summary

Generates an XML that describes schema differences between a replica geodatabase and the relative replica geodatabase.

Usage

Syntax

CompareReplicaSchema_management (in_geodatabase, in_source_file, output_replica_schema_changes_file)
ParameterExplanationData Type
in_geodatabase

Specifies the replica geodatabase to which the replica schema will be compared. The geodatabase may be a local geodatabase or a geodata service.

Workspace; GeoDataServer
in_source_file

Specifies the file that contains the relative replica schema to use for the comparison.

File
output_replica_schema_changes_file

Specifies the file to contain a description of the schema differences.

File

Code Sample

CompareReplicaSchema example 1 (Python window)

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

import arcpy
from arcpy import env
env.workspace = "C:/Data"
arcpy.CompareReplicaSchema_management("MySDEdata.sde", "RelativeReplicaSchema.xml", "SchemaComparison.xml")
CompareReplicaSchema example 2 (stand-alone Python script)

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

# Name CompareReplicaSchema_Example2.py
# Description: Compares a replica schema (in an SDE workspace) to its relative replicas schema (in an XML file).  
# The results of the comparison are created in an XML file
# The relative replicas XML schema file was created using the ExportReplicaSchema tool.


# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_geodatabase = "MySDEdata.sde"
in_source_file = "RelativeReplicaSchema.xml"
output_schema_changes = "outputSchemaChanges.xml"

# Execute CompareReplicaSchema
arcpy.CompareReplicaSchema_management(in_geodatabase, in_source_file, output_schema_changes)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013