Select to view content in your preferred language

Replication Sync Error: Table Already Exists

8025
26
11-13-2012 12:04 PM
IanKramer
Regular Contributor
Hi,
Has anybody seen a "Table already exists" error when trying to sync a replica?

Ok, here's my details. Both servers are Windows 2008 R2 64-bit, running SQL Server 2012, with ArcGIS 10.1 SP1. The Parent GDB is using a version specifically set up for the replica, which is derived off of a QA/QC version. The child uses the DEFAULT version. Both use the SDE user and its set up as a 2-way replica.

We already have copies of the data at both locations, so I created a custom ArcObjects tool that registers a feature class with an an existing replica, which specifies the "Register Only" option. This code is taken directly from the samples pages and deployed as a custom GP tool. The reason I choose this route is because I need to register over 100 feature classes, within a single replica, and I didn't want to do it manually using ArcMap. This process works fine. After it created, I sync'ed the replica and it worked with no errors. I then found a set of 5 feature classes, that had a different amount of features (missing features in one and not the other) before the replica was set up. I identified the "differences", made a copy of them in a FGDB, deleted them from the parent version, and appended them into the version from the FGDB. In essence, I treated them as newly edited (inserted) features. This was done because these feature classes participate in other versions that are actively being edited at both locations and I can't reload them at either location. Plus I needed to fool the replication process into copying them over to the child so that I could preserve the GlobalID's.

After this was done, I reran the sync and I get "Table already exists". Here is an excerpt from the ReplicaLog.dat file.

<ReplicaMsg time='11/13/2012 3:13:10 PM' type='LOG_MESSAGE_TYPE_DEBUG' code='' elapsed='0.000000 mins' method='TransferingInsert' objectClassName='Vector.SDE.spill_containment_feature_area' replicaName=''>Inserting {40AF74B7-5E91-45C6-B556-7E24CF98B065} feature</ReplicaMsg>


<ReplicaMsg time='11/13/2012 3:13:10 PM' type='LOG_MESSAGE_TYPE_WARNING' code='' elapsed='0.003733 mins' method='TransferingChanges' objectClassName='Vector.SDE.spill_containment_feature_area' replicaName=''>Table already exists - Vector.SDE.spill_containment_feature_area</ReplicaMsg>

I have no idea why its trying to recreate the feature class since it already exists and is registered with the replica. There were no replica or schema changes made to the replica's objects since its creation.

Ok, so then I tried to do a manual export/import. I got this error when importing the changes to the child.

"Import Changes Failed. Table Already Exists. The workspace is not connected. The workspace is not connected...."

Has anybody experienced this before? Thank you!

Ian
0 Kudos
26 Replies
HeatherMcCracken
Esri Contributor
Ian,

It would be a good idea to talk with support.

During synchronization we make use of global temporary table when the # of changes reaches a certain threshold (i think 1000+?).  If the global temporary table doesn't exist, it gets created.   My guess is this the table that's throwing the error? You are correct that Replication will not try to create that output table that is part of your replica during data synchronization.

-Heather
0 Kudos
deleted-user-vpHnfyiCToFz
Deactivated User
I got this error as well.  What a worthless message!  I'm planning on just recreating the replica.  Currently on ArcGIS 10.1 sp1.  Didn't see this message until after service pack was applied.
0 Kudos
ZacharyHart
Honored Contributor
Same error. I've had similar problems in the past but the exact error has changed with SP1. The last few times the only solution was to re-create the replica...
0 Kudos
MandarPurohit
Esri Contributor
It seems that this issue is reproducible only with Sql Server 2012 and originates only when conflicts are present during the synchronization.
Any successive synchronizations, even with a new replica registered on this geodatabase, seem to encounter the "Table already Exists" error.

The issue does not seem reproducible with other versions of Sql Server (for e.g. Sql Server 2008 R2) even using ArcGIS 10.1 SP1.

- Mandar
0 Kudos
deleted-user-vpHnfyiCToFz
Deactivated User
It seems that this issue is reproducible only with Sql Server 2012 and originates only when conflicts are present during the synchronization.
Any successive synchronizations, even with new replica registered on this geodatabase, seem to encounter the "Table already Exists" error.

The issue does not seem reproducible with other versions of Sql Server (for e.g. Sql Server 2008 R2.)

- Mandar


Is this fixed in upcoming patches or service pack 2?
0 Kudos
ZacharyHart
Honored Contributor
just got off phone with with ESRI and no luck so far.

For what its worth, when I run the synch tool from toolbox instead of the wizard tool bar i get the 'table already exists' in the results messages but also get a 'error 000582'.........which unfortunately is a catch-all type of error.

Mandar, is there a bug reported? Because if not right now i'm not seeing any resolution or work around and if I understand what you're saying correctly if you have conflicts and if you have a 2012 DB server...you're outta luck? I'd suspect that there are a lot of people with this deployment scenario.
0 Kudos
deleted-user-vpHnfyiCToFz
Deactivated User
just got off phone with with ESRI and no luck so far.

For what its worth, when I run the synch tool from toolbox instead of the wizard tool bar i get the 'table already exists' in the results messages but also get a 'error 000582'.........which unfortunately is a catch-all type of error.

Mandar, is there a bug reported? Because if not right now i'm not seeing any resolution or work around and if I understand what you're saying correctly if you have conflicts and if you have a 2012 DB server...you're outta luck? I'd suspect that there are a lot of people with this deployment scenario.

I have seven deployments in which two are using replication.  If this is a 2012 DB server issue, this needs to be fixed ASAP.  All my new deployments are built on sql server 2012.  It doesn't make sense to deploy on older versions.
0 Kudos
ZacharyHart
Honored Contributor
I have seven deployments in which two are using replication.  If this is a 2012 DB server issue, this needs to be fixed ASAP.  All my new deployments are built on sql server 2012.  It doesn't make sense to deploy on older versions.


Luke, I couldn't agree more, and if SP1 turns out the be the culprit there really needs to be a much larger announcement or straight-up warning about making the upgrade.
0 Kudos
MandarPurohit
Esri Contributor
The nim NIM086855 is close to the earlier discussion/report on this synchronization issue.

The workaround is listed as "Using SQL Server Native Client 2008 R2 for the ArcGIS Desktop machine to synchronize changes."

Please contact Technical Support to confirm if this is the exact case encountered and/or regarding the workaround.

Thank you,
Mandar
0 Kudos