ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Import Replica Schema

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Applies replica schema differences using an input replica geodatabase and XML schema file.

Usage

  • The input replica schema changes file must be XML.

  • 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.

Syntax

arcpy.management.ImportReplicaSchema(in_geodatabase, in_source)
ParameterExplanationData Type
in_geodatabase

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

Workspace; GeoDataServer
in_source

Specifies the file which contains the replica schema to import.

File

Code sample

ImportReplicaSchema Example (Python Window)

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

import arcpy
from arcpy import env
env.workspace = "C:/Data"
arcpy.ImportReplicaSchema_management("Countries.mdb", "schemaDifferences.xml")
ImportReplicaSchema Example 2 (stand-alone Python script)

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

# Name: ImportReplicaSchema_Example2.py
# Description: Imports a schema changes file into a replica geodatabase (MDB)
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
replica_geodatabase = "Countries.mdb"
schema_file = "schemaDifferences.xml"

# Execute ImportReplicaSchema
arcpy.ImportReplicaSchema_management(replica_geodatabase, schema_file)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

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

Related topics

  • An overview of the Distributed Geodatabase toolset
  • Working with geodatabase replicas
  • Schema changes
  • Working with schema changes

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal