Distributed Database - Schema Changes

224
0
08-19-2013 07:34 AM
LaurenYee
Occasional Contributor
Hi, I'm hoping someone may be able to answer this here as I didn't receive any replies in my python forum:

Distributed Database -Schema changes

    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:

    Code:

        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")
0 Kudos
0 Replies