AnsweredAssumed Answered

Arcpy unregister replica's

Question asked by NEOMAPPER on Sep 7, 2018

Does anyone have knowledge with unregistering replica's using arcpy or some other solution I can incorporate into my script. We'd like to unregister replica's and the only workaround we've found was using the python function SynchronizeChanges_management. It kinda works but sometimes it doesn't remove the replica in the manager and we're forced to do it manually. 

 

# Local variables:
jnmiller_GIS_v1_gdb = "C:\\EIS\\%s_%s_v%s.gdb" % (versionName, version_list, checkout_number)
jnmiller_GIS_v1_gdb__2_ = jnmiller_GIS_v1_gdb
NEO_sde__2_ = jnmiller_GIS_v1_gdb
NEO_sde = "Database Connections\\NEO.sde"

# Execute SynchronizeChanges

try:
    print("Attempting to Synchronize %s" % working_file)
    # Process: Synchronize Changes
    arcpy.SynchronizeChanges_management(jnmiller_GIS_v1_gdb, "%s_%s_v%s", NEO_sde, "FROM_GEODATABASE2_TO_1", "IN_FAVOR_OF_GDB2", "BY_OBJECT", "RECONCILE ")% (versionName, version_list, checkout_number)
except Exception:           
    e = sys.exc_info()[1]
    print(e.args[0])

Outcomes