import arcpy from arcpy import env arcpy.MakeFeatureLayer_management(r'Database Connections\GISAdmin@SBMPERDBS003.sde\GISAdmin.Leonora_Drilling\GISAdmin.LEO_DH_Collars','LeoDHCollars') arcpy.MakeXYEventLayer_management(r'\\SBMPERTST001\Applications\GIS\DataShed Exploration_LEO Export\Arc_DHCollars.csv',"NAT_East","NAT_North","LeoDHCollarsNEW") arcpy.MakeFeatureLayer_management("LeoDHCollarsNEW",'LeoDHCollarslyr') arcpy.ChangeVersion_management('LeoDHCollars','Transactional','GISADMIN.DataUpdates','') workspace=r'Database Connections\GISAdmin@SBMPERDBS003.sde' edit= arcpy.da.Editor(r'Database Connections\GISAdmin@SBMPERDBS003.sde') edit.startEditing(True,True) edit.startOperation() with arcpy.da.InsertCursor("LeoDHCollars", ('SHAPE@', 'Hole_Type')) as icur: icur.insertRow([(7642471.100, 686465.725), 'New School']) edit.stopOperation() edit.stopEditing(True) arcpy.DisconnectUser(r'Database Connections\SDE@SBMPERDBS003.sde', "ALL") arcpy.ReconcileVersions_management(workspace,"ALL_VERSIONS","SDE.GIS_Default","GISADMIN.DataUpdates","LOCK_ACQUIRED","NO_ABORT","BY_OBJECT","FAVOR_TARGET_VERSION","POST","KEEP_VERSION")
... edit.startEditing(True,False) ...
And on line 15 it switches from 'Database Connections\GISAdmin@SBMPERDBS003.sde' to 'Database Connections\SDE@SBMPERDBS003.sde'
Esri has confirmed this situation and marked it as a bug:
BUG-000114598:
-----------------------------
RuntimeError "workspace already in transaction mode" occurs when using da.UpdateCursor on TableView after changing the version.
The "Database Connections" part of the path that you are seeing is normal behavior. This is Esri's way to abbreviating the default location where SDE connection files are stored on the machine when creating them under Database Connections in ArcCatalog or ArcMap. So, "Database Connections\..." really refers to the user profile directory. For example in Windows 7 or Windows Server 2008 R2,
C:\Users\userID\AppData\Roaming\ESRI\ArcCatalog\SDE@SBMPERDBS003.sde
...would be represented by Esri software as...
Database Connections\SDE@SBMPERDBS003.sde