Python – Creating Script to Reconcile/Post Geodatabase Versions

arcgis-9.3enterprise-geodatabasepythonversioning

I’m trying to set up a python script so that I can schedule our rec/post to run on a server. I’ve created a model with the Reconcile Version tool, with the option to Post checked on. I then export this to a Python script. I run the script, and it finishes without any errors, but I do not see that my edits are posted to the default version. Is it not possible to script this tool, or is there a switch that I’m missing?

I’m using ArcSDE 9.3.1.

Best Answer

You should be able too. Below is the help for the tool, and how I've implemented it before:

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1991&pid=1986&topicname=Reconcile_Version_(Data_Management)

is ESRI's help for the gp tool for that functionality. Try:

gp.reconcileversion_management(inworkspace, versionname, "DEFAULT", "BY_OBJECT", "FAVOR_TARGET_VERSION", "NO_LOCK_ACQUIRED", "ABORT_CONFLICTS", "POST")

is the way I've used it. However I've had issues running python on our server so I ported the process over to a full arcobjects desktop app that seems to run fairly well.

Related Question