yeel

Distributed Database -Schema changes

Discussion created by yeel on Aug 13, 2013
Hi,
I'm using python to export schema from the master replica to about three different replicas.
The way the code is structured in python you need to specify each separate replica to export the XML schema.

Since all three are replica's of the master, wouldn't it be the same - in theory - that I export the XML from the master and apply it to all three replicas?

As it is currently I have to write three separate lines of code.
This is from a master SDE to multiple GDBS as well as an additional SDE

Just looking to save some time.

Example:

    arcpy.ExportReplicaSchema_management(Connection_to_gisserver_sde, GISSERVER_Schema_xml, "DBO.Replica")
    print ("Export complete")
    print ("Compare replica schema")
    # Process: Compare Replica Schema
    arcpy.CompareReplicaSchema_management(MasterUpdate_gdb, GISSERVER_Schema_xml, Compare_xml)
    print ("Comparison complete")
    print ("Import Replica schema")
    # Process: Import Replica Schema
    arcpy.ImportReplicaSchema_management(MasterUpdate_gdb, Compare_xml)
    print ("Import complete")
#Replica two
    arcpy.ExportReplicaSchema_management(Connection_to_gisserver_sde, GISSERVER_Schema_xml, "DBO.Replica2")
    print ("Export complete")
    print ("Compare replica schema")
    # Process: Compare Replica Schema
    arcpy.CompareReplicaSchema_management(MasterUpdate2_gdb, GISSERVER_Schema_xml, Compare_xml)
    print ("Comparison complete")
    print ("Import Replica schema")
    # Process: Import Replica Schema
    arcpy.ImportReplicaSchema_management(MasterUpdate2_gdb, Compare_xml)
    print ("Import complete")

Outcomes