1

I'm trying to create a one-way replica between two ArcGIS Enterprise Geodatabases. The process works when I select only the tables in the parent. The replica will successfully copy all datasets to the child database. However, when I select the feature classes (there are hundreds of them), the process fails after about 17-18 minutes or so.

Replica Settings:

enter image description here

Error Message:

ERROR 000582: Error occurred during execution. Item with the same path name already exists.

enter image description here

The child database is essentially empty and doesn't contain any feature classes yet. My first thought was that the process was truncating long feature class names, however, the feature class name length limit is 255 characters and the longest one (including database name and schema is 95 characters).

Both databases are on different servers. Both servers are are Windows Server 2016. Databases are SQL Server 2017.

I had a look at this site, where one suggestion is to create a replica on each individual dataset to see which one is causing the error. However, there are over 600 feature classes. Is there an easy way to figure out what is going on here?

  • You could write a python script with arcpy.da.Walk and Create Replica resources.arcgis.com/en/help/main/10.2/index.html#//… to iterate your feature classes to find the 'bad' one. Considering this is a one way replica would there be any difference if you used Copy or Export to XML Workspace followed by import from XML instead? Is Create Replica creating a version in the parent? if so it could be the version that is causing the error, check to see if you've got a bunch of half-baked versions in the parent and child. – Michael Stimson May 23 at 4:06
  • I want to synchronise changes regularly and not copy the entire dataset. But otherwise, yes, I could copy. Export to XML is causing issues for me. – Fezter May 23 at 4:09
  • 1
    Can you test creating a similar replica to a brand new file Geodatabase? This would test if there is a problem specific to the destination database. In particular, if an attempt at creating the replica (or some other processing against the child database) left a table in that database which is not fully registered with the geodatabase it may appear empty, but actually conflict with what the replica is trying to create. – Son of a Beach May 23 at 4:11
  • Have you examined the contents of the intended child replica database in SQL directly (ie, not using ArcGIS) to see what tables, views, etc are there? – Son of a Beach May 23 at 4:12
  • @SonofaBeach clearly something is not right with the child database. After over 90 minutes, the replica to a file gdb worked. I'll investigate further tomorrow. – Fezter May 23 at 6:23
3

Using following code, you can use identify the feature class that is causing this problem. But before using this delete/unregister previous replicas.

import arcpy
from arcpy import env

# Set workspace, must be ParentDB.
parent_workspace= "parent.sde" 
child_workspace ="child.se"
env.workspace="parent.sde"

replica_type = "ONE_WAY_REPLICA"
#make sure the replica name does not conflit with the existing name.
access_type = "FULL"
initial_sender = "PARENT_DATA_SENDER"
expand = "USE_DEFAULTS"
reuse_schema = "DO_NOT_REUSE"
get_related = "GET_RELATED"
replica_geometry = ""
archiving = "DO_NOT_USE_ARCHIVING"

# Execute CreateReplica for each feature class

fdlist = arcpy.ListFeatureClasses()
for fd in fdlist:
    in_data=fd
    replica_name=fd
    try:
        arcpy.CreateReplica_management(in_data, replica_type, child_workspace , replica_name,access_type, initial_sender, expand, reuse_schema, get_related, replica_geometry, archiving)
    except:
    #problematic feature class.
        print (fd)
0

After much head scratching and swearing, I've solved this issue. ESRI's error message:

ERROR 000582: Error occurred during execution. Item with the same path name already exists.

is very vague. There was no indication anywhere, what "item" the error is referring to.

This error was occurring when I did a straight copy/paste from one database to another as well, not just via replication.

It turns out, the issue was not duplicate feature classes, but in fact, a duplicate domain. Both source databases had a domain called "Owner". The solution was to rename one of them "Owner_1" and then replicate the data. It's also important to note, that ArcGIS doesn't care about the case of these domains. In fact, one database had a domain called "owner" and the other was "Owner".

My solution was to list all domains, in each database, change them to UPPERCASE and then convert them to python sets. I then performed the intersection set operation to identify duplicates.

DB1_Domains_Upper_Set = set([domain.upper() for domain in arcpy.da.ListDomains(db1)])
DB2_Domains_Upper_Set = set([domain.upper() for domain in arcpy.da.ListDomains(db2)])

domain_overlap = DB1_Domains_Upper_Set.intersection(DB2_Domains_Upper_Set)

domain overlap yielded:

set([u'OWNER'])

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.