AnsweredAssumed Answered

Reconcile, Post a Version Create with Operating System Authentication

Question asked by patton44 on Jul 3, 2018
Latest reply on Dec 5, 2018 by sennaa94

We have a Python script that uses arcpy.ReconcileVersions to reconcile and post user versions. We have recently switched from using database logins for most of our users to operating system authentication. While the script has always been able to reconcile and post versions that were created with database authentication, it does not seem to be working with operating system authentication versions.

 

The script loops through a list of versions. The SDE.DEFAULT version and any replica versions are ignored. The version name and the parent version name are returned from the version. I am connecting to the database as the SDE user.

 

for version in arcpy.da.ListVersions(gastoniaConnection):
   if version.name not in {"SDE.DEFAULT", "SDE.GASTONIA"}:
      if not 'SYNC' in version.name:
         childVersion = version.name
         parentVersion = version.parentVersionName
         f.write(time.strftime("%m_%d_%Y_%H:%M:%S") + " Reconciling and posting " + childVersion + " to " +          parentVersion + " started." + '\n')
         RecPost_Versions_NoDelete(childVersion,parentVersion)
         f.write(time.strftime("%m_%d_%Y_%H:%M:%S") + " Reconcile and post " + childVersion + " to " + parentVersion +          " completed." + '\n')
         childVersionCount = childVersionCount + 1

 

Using a function, the version is reconciled and posted with  ReconcileVersions_management.

 

def RecPost_Versions_NoDelete(childVersion,parentVersion):
   arcpy.ReconcileVersions_management(gastoniaConnection,"ALL_VERSIONS",parentVersion,childVersion,"LOCK_A     CQUIRED","ABORT_CONFLICTS","BY_OBJECT","FAVOR_TARGET_VERSION","POST","KEEP_VERSION")
   return childVersion

 

While the version name returned with version.name and passed to ReconcileVersions does not cause an error, in reality, it does not do anything. Is there a special way that the name of a version created with operating system authentication should be formatted for the arcpy.Reconcile Versions? 

 

As a test, I have tried to reconcile and post an operating system authentication version manually with the Reconcile Versions tool in ArcToolbox and that will work. 

Outcomes