Select to view content in your preferred language

Synchronizing Changes From File Geodatabase to SDE Geodatabase

3605
7
04-11-2013 10:42 AM
JohnVu
by
Emerging Contributor
I have an SDE geodatabase that has a one way replication to a file geodatabase, where I will make edits to the feature classes offline somewhere. I know that this scenario doesn't support one-way or two-way replication, so is there anyway I can push the updates I made in the file geodatabase back to the SDE geodatabase?
0 Kudos
7 Replies
JoeBorgione
MVP Emeritus
I have an SDE geodatabase that has a one way replication to a file geodatabase, where I will make edits to the feature classes offline somewhere. I know that this scenario doesn't support one-way or two-way replication, so is there anyway I can push the updates I made in the file geodatabase back to the SDE geodatabase?


What do you mean by 'offline somewhere'?

You are describing what two-way replication is.
That should just about do it....
0 Kudos
AsrujitSengupta
Deactivated User
0 Kudos
HeatherMcCracken
Esri Contributor
so is there anyway I can push the updates I made in the file geodatabase back to the SDE geodatabase?


Yes you can - but you will need to create a Checkout/Checkin replica instead of One way replica.  You will then be able to make edits in the checkout file geodatabase, and then check the changes back in (sync) to the Enterprise Geodatabase (SDE). To make more changes, you will need to recreate the checkout each time. 

(For one-way and two-way replication we require that the Geodatabases that are sending the changes be Enterprise Geodatabases, they cannot be personal or file gdbs.)

Learn more about Checkout/Checkin replication in the following link:
http://resources.arcgis.com/en/help/main/10.1/#/Replication_types/003n000000t6000000/

-Heather
0 Kudos
JohnVu
by
Emerging Contributor
Thanks for the all the input guys. I ended up writing a script to automatically create a check-out replica from an SDE to a file geodatabase. I do have another question though: My script runs into a problem when a check-out replica already exists. Do you know how to do a check if a replica exists, and if it doesn't, create the replica?
0 Kudos
RussellBrennan
Esri Contributor
My script runs into a problem when a check-out replica already exists. Do you know how to do a check if a replica exists, and if it doesn't, create the replica?


You can use the arcpy.da.listreplicas() function to list all the replicas objects in a geodatabase. You can use arcpy.exists() to check for the existance of a file geodatabase.

ListReplicas
http://resources.arcgis.com/en/help/main/10.1/index.html#/ListReplicas/018w00000003000000/

Exists:
http://resources.arcgis.com/en/help/main/10.1/index.html#/Exists/018v0000004p000000/

0 Kudos
JohnVu
by
Emerging Contributor
When I synchronize changes, the replica is gone between my file and SDE geodatabase and I confirm through the replica manager and running the ListReplicas() function. However, when I try to create another check-out replication with the same name between the same file and SDE geodatabase, it says the replica already exists in master database. I know the same replica name doesn't exist, but it still gives me this error. Can somebody test this scenario and see if you get the same error?

Scenario:

  1. Create check-out replication from SDE to file geodatabase

  2. Synchronize changes (this should get rid of the replication)

  3. Create another check-out replication with the same replication name from step 1 (I get an error at this step)

0 Kudos
JohnVu
by
Emerging Contributor
Hey guys,

I was able to fix my issue right from above, but I have another issue with my syncing script.

When I try to synchronize changes between my file geodatabase (located on the N: drive) and my SDE (located on the A: drive), it gives me an error saying my SDE dataset does not exist or is nor supported. I know the SDE exists because I use the same one in other scripts, so I am not sure why it is giving me this error.
0 Kudos