2

I have two ArcSDE databases, running with a two-way replica.One serves our interactive mapping website which gives certain users the ability to update, add points, edit attributes, etc. Then we have our master which is updated frequently by power users.

There are only a few feature classes that are currently being edited, and I would like to synchronize these updates ONLY if these feature classes have been edited.

I've developed a python script using the compare features tool, which compares the feature datasets with the master. I'd like to only synchronize changes from these three layers, update the master (so child to parent) and then have the master sync any new changes to the edit database (parent to child).

Is there any way to synchronize changes and schema for individual datasets or is there a better way to go about this?

import arcpy    
aburg_master_DBO_TownOwnedJan2013 = "Database Connections\\Connection to       gisserver.sde\\aburg_master.DBO.Geocortex\\aburg_master.DBO.TownOwnedJan2013"
Aburg_Edit_DBO_TownOwnedJan2013 = "Database Connections\\Connection to gisserver(2).sde\\Aburg_Edit.DBO.Geocortex\\Aburg_Edit.DBO.TownOwnedJan2013"
compare_txt = "C:\\Test\\compare6.txt"

# Process: Feature Compare
result = arcpy.FeatureCompare_management(aburg_master_DBO_TownOwnedJan2013,   Aburg_Edit_DBO_TownOwnedJan2013, "GlobalID", "ATTRIBUTES_ONLY", "IGNORE_M;IGNORE_Z", "0.001 Unknown", "0", "0", "", "OBJECTID;created_user;created_date;last_edited_user;last_edited_date", "NO_CONTINUE_COMPARE", compare_txt)
changes = result.getOutput(1)
print "Comparision Result is: " + changes
change = str(changes)
if change == 'false':
    print "LOL"
else:
    print "Nope"
  • I'm glad to see I'm not the only person that uses lol in my scripts.... – Paul Jul 25 '13 at 20:05
  • Essentially a replica can be any single data set or even version. You set up the replica in a map document. – Brad Nesom Jul 26 '13 at 0:42
  • the quick & dirty way is to create replicas for individual datasets when you need it, there's no problem to use multiple replicas. – geogeek Jul 26 '13 at 2:58
  • I suppose I could create multiple replicas... I would like to hear other options though, as each time I create a replica I have to turn off our services and each replica takes 20 + mins to run – GISKid Jul 26 '13 at 12:46
  • Why do you have to turn off your services? I'm surprised by that. We have a very similar circumstance to yours and our replicas sync everyday via script. I'm curious to see how you handle the automation of schema changes...something I've wanted to script for some time now, but haven't gotten around to it. Oh, and as other users said, no problem running multiple replicas on the same GDB. – Clickinaway Jul 26 '13 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.