5

Seems odd but I can't find an arcpy or geoprocessing tool to delete/unregister replicas.

When you create a replica it gets registered with the GDB that the data comes from. Afterwards you can't create another replica with the same name, you must first unregister the first one. To unregister a replica after it has been created you need to right click on the GDB in ArcCatalog, chose distributed databases and then manage replicas. From there you can pick an individual replica from all the replicas in that GDB and unregister it. This is what I would like to be able to do programmatically.

There are arcpy tools to create and sync replicas but not delete. Am I just being blind or does such a tool not exist?

7
  • 1
    Are you looking for something like this (help.arcgis.com/En/Arcgisdesktop/10.0/Help/index.html#//…)? – Branco Jul 21 '15 at 18:29
  • 1
    What do you mean by unregister? – Emil Brundage Jul 21 '15 at 18:48
  • 1
    This a strange question. So GDB replicas are created so that you can sync the changes from the replica back to the parent GDB. The syncing is maintained with a server-maintained Global_ID field. If you want to un-sync them such that updates to the replica will not be pushed to the parent, you could (a) not make a replica in the first place and just make a standard copy, or (b) copy all the feature classes to a new blank GDB that isn't synced to the original. If you scramble the Global_IDs, then the sync is no good and you've effectively "unregistered" the GDB too. – John Jul 21 '15 at 19:42
  • 1
    It's not all that strange a question. The UI permits an Unregister request on a replica, but there is no documented tool within the Distributed Geodatabase toolset to unregister a replica. – Vince Jul 25 '15 at 1:22
  • 1
    FWIW, here's the Unregister method in arcobjects. – Kirk Kuykendall Sep 29 '15 at 22:36
1

If you publish the GDB to ArcGIS for Server you can called the unRegisterReplica web method passing in the GUID of the Replica. I was on 10.4

1
  • Thanks Gerald, I can make this work. A Geodata service also has an unregister operation which is exactly what I need. I didn't know the REST API allowed this. – Dowlers Mar 25 '16 at 14:54
4

I went and voted for this, but I want to share my workaround too as it took much research to figure out.

I was able to create a replica using CHECK_OUT then when complete used arcpy.SyncronizeChanges_management and as a result the replica was removed.

1
  • jingles thanks for your help and thew suggestion. Unfortunately checkin/checkout replicas are not an option in my use case.I think @Kirk Kuykendall comment came closest to a solution, but my client lost interest. – Dowlers Mar 11 '16 at 16:56
3

So it turns out the tool doesn't exist. There is a request to ESRI to create it under the ideas site. If anybody comes across this post and has a similar need it would be great if you could vote for it too.

Edit 20160325

Gerald suggested the unregister operation in a feature service, and it turns out there is also an unregister operation in a geodata service. While a proper arcpy tool would be easier I can certainly do what I need with these Rest API operations.

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.