Replication Sync Error: Table Already Exists

6988
26
11-13-2012 12:04 PM
IanKramer
New Contributor III
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
deleted-user-vpHnfyiCToFz
Occasional 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


We had an issue connecting to sql server 2012 databases using the sql native client other than using the sql native client 2012...identical release version as the database.  If you use the one that comes with the sql server 2012 install media kit, it doesn't work.  Going to Microsoft website downloading the latest fixed the connection issues with ArcGIS Desktop.  Can you validate that the NIM086855 is set to be released in the next service pack?
0 Kudos
ZacharyHart
Occasional Contributor III
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



from: http://proceedings.esri.com/library/userconf/proc12/tech-workshops/tw_242.pdf
Use SQL Native Client software at least as new as teh SQL Server database engine

How can you use a 2008 client to connect to a 2012 DB? I have both native clients installed on my desktop/client: 2008R2 for connecting to 2008 DBs and 2012 for 2012 DBs, I'm currently not having any trouble connecting to either; just synchronizing.

What are we missing here?
0 Kudos
NanaDei
Esri Contributor
Hi Luke,
The behavior seems to be related to SQL Server 2012 native client and we are actively reviewing this issue. The SQL Server 2008R2 native client is forward compatible and it can be used with the SQL Server 2012 gdb as a workaround for this replication sync behavior while we review the issue.

Testing on our end indicated that the sync succeeds only with SQL Server 2008R2 native client installed on the client machine. The sync fails under these conditions:
- SQL Server 2012 native client installed on a client machine
- both clients (SQL Server 2012 native client & SQL Server 2008R2 native client) are installed on the same client machine

From your post you mentioned that "We had an issue connecting to sql server 2012 databases using the sql native client other than using the sql native client 2012...identical release version as the database."
What is the build of the sql server instance? eg. SQL Server 11.0.2100
Is it likely you'll be able to test from a test machine having only SQL Server 2008R2 native client installed?
You can also log a support incident for further review if the connection issue persists with only the SQL Server 2008R2 native client installed.

Thanks
0 Kudos
ZacharyHart
Occasional Contributor III
Confirmed: removed SQL 2012 Native Client and Synchronization proceeded without error.

Currently only the MS SQL Server 2008 R2 Native Client (build 10.50.1600.1) is installed.

Still fairly sure this started with SP1 upgrade.

Thanks!
0 Kudos
deleted-user-vpHnfyiCToFz
Occasional Contributor
What's the ETA on the fix for this bug?  I really don't like mixed matched versions of software in an enterprise network.  Call be 'OCD' but seems a bit odd to me.

Workaround worked; at least it still is working for now.
0 Kudos
IB1
by
Occasional Contributor
I'm using the 2008 R2 client and still getting this message when trying to synchronize.

All of this is so fragile, I'm a little worried to even think about using it with a client.
0 Kudos
deleted-user-vpHnfyiCToFz
Occasional Contributor
I'm using the 2008 R2 client and still getting this message when trying to synchronize.

All of this is so fragile, I'm a little worried to even think about using it with a client.


I've setup an autosynch replica python script to run under windows task scheduler on another system.  It has been running for three months now without any complications on the work around.  If you are still having problems, I would think there is something else going wrong with your connections. It is definitely a weird bug.  I would have expected a patch by now.
0 Kudos
nicogis
MVP Frequent Contributor
0 Kudos
IanBroad2
New Contributor III
see http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDg3NzY1


The link doesn't work. It ask me to login and then takes me right back to the login page again.

Seems to be some bugs in the website.
0 Kudos
AsrujitSengupta
Regular Contributor III
The link doesn't work. It ask me to login and then takes me right back to the login page again.

Seems to be some bugs in the website.


Its not a problem with the link.

The correct link: http://support.esri.com/en/bugs/nimbus/TklNMDg3NzY1
0 Kudos