Summary
Creates a replica schema file with the schema of an input one- or two-way replica.
Usage
The output schema file must be XML. 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. Three tools are provided for this purpose: Compare Replica Schema, Import Replica Schema, and Export Replica Schema:
- Use Compare Replica Schema (this tool) to generate an XML file containing the schema changes.
- Import these changes with the Import Replica Schema tool.
- If you're working in a disconnected environment, you first need to run the Export Replica Schema tool to export the schema with the changes to an XML file. This file can then be transported on media, such as CDs or DVDs, for input into the Compare Replica Schematool.
This tool is used when synchronizing replica schema. Additionally, see the Compare Replica Schema and Import Replica Schema tools.
Syntax
ExportReplicaSchema_management (in_geodatabase, output_replica_schema_file, in_replica)
Parameter | Explanation | Data Type |
in_geodatabase | Specifies the replica geodatabase from which to export the replica schema. The geodatabase may be local or remote. | Workspace; GeoDataServer |
output_replica_schema_file | Specifies the file in which to export schema. | File |
in_replica | The replica from which to export schema. | String |
Code sample
ExportReplicaSchema Example (Python Window)
import arcpy
from arcpy import env
env.worksapce = "C:/Data"
arcpy.ExportReplicaSchema_management("Countries.mdb", "replicaSchema.xml", "MyReplica1")
ExportReplicaSchema Example 2 (stand-alone Python script)
# Name: ExportReplicaSchema_Example2.py
# Description: Exports replica schema from a personal geodatabase with a replica
# Author: ESRI
# Import system modules
import arcpy
from arcpy import env
# Set workspace
env.worksapce = "C:/Data"
# Set local variables
replica_workspace = "Countries.mdb"
output_file = "replicaSchema.xml"
replica = "MyReplica1"
# Execute ExportReplicaSchema
arcpy.ExportReplicaSchema_management(replica_workspace, output_file, replica)
Environments
Licensing information
- ArcGIS for Desktop Basic: No
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes