Workflow for gdb replication

6145
18
01-21-2016 08:09 AM
mpboyle
Occasional Contributor III

This is my first go around with gdb replication and am looking to create a 1-way replica from a sde gdb to either another sde gdb or a file gdb.  I was hoping to get an idea of the best practices and workflows for keeping the two gdbs in sync?

My assumption is you start with the Create Replica tool in order to replica data from parent to child, is that right?

After that is done, I have a few questions about workflow and best practices...

1) How do you add a feature class to the child gdb after the replication process is in effect?

2) If a feature class is deleted from the parent gdb, how do you delete the feature class in the child?...do you simply delete it through ArcCatalog?

3) If a field is added or removed in a feature class within the parent gdb, how do you send that change to the child gdb?...can it be automated or is it manual?

4) If a domain is added / altered / removed, how do you send those changes to the child?...can it be automated or is it manual?

5) What is a good 'routing' for syncing changes?  Do you first reconcile and post edits in the parent gdb, then sync changes?  Should some processes, like comparing schema be done first before syncing changes?

I'm looking to get an idea of what workflows others use that have been successful, easy to manage, and keeps your data in sync.

Thanks!

18 Replies
JacobBoyle
Occasional Contributor III

The Create Replica Tool is what I use.

Answers for questions 1-5:

  1. you'll have to recreate the replica on the child
  2. you can use the Export Replica Schema -> Compare Replica Schema -> Import Replica Changes tools
  3. Same step as above, this is a manual process.
  4. Same step as #2.
  5. The Compare Replica Schema tool is only for making changes to the child database.  If you are using a one-way replica, you'd only be pushing changes from the parent to the child, not the other way around.  if you want to push and pull data from the child, then you need to use a 2 way replica
mpboyle
Occasional Contributor III

Jacob Boyle​,

Thanks for the responses, that does help!

Say I wanted to script a routine to run daily, or on a regular interval to sync the parent gdb with the child gdb in a 1-way replica scenario.  Would the steps below be realistic...?...or is there a 'better' or more realistic approach?

1) Reconcile and post edits in parent sde gdb to DEFAULT version

2) Export Replica Schema -> Compare Replica Schema -> Import Replica Changes --- this would be to keep schemas the same between the two gdb

3) Synchronize Changes

0 Kudos
JacobBoyle
Occasional Contributor III

You could do that, but unless you're changing schema daily/weekly I'd just do it manually when you made changes. No reason IMO to add that overhead to your nightly syncs.

I'd just reconcile and post to Default and Synchronize Changes daily.

mpboyle
Occasional Contributor III

Jacob Boyle

If schema were to change, do you need to delete / unregister the replica and then re-create it?  I guess I'm wondering when that is necessary?  Would adding a feature class or field in the production sde gdb be brought over by running the export schema -> compare schemas -> import schemas?

0 Kudos
JacobBoyle
Occasional Contributor III

If you change the existing schema, IE add a field, change a domain, delete a field, you can use export schema -> compare schema -> import schema.

If you're adding Feature Class, you'll need to re-create the replica.

mpboyle
Occasional Contributor III

Jacob Boyle​,

Can replicas be overwritten or do they need to be unregistered from both gdbs?

Thanks for help!!!

0 Kudos
JacobBoyle
Occasional Contributor III

You need to unregister the replica from both GDB, then delete the data from the Child.  then you can re-create the replica.

mpboyle
Occasional Contributor III

Jacob Boyle​,

I have a testing environment with an editing sde gdb and a child file gdb.  The process seems pretty straight-forward for syncing changes, and updating schemas.  However, I removed a field from a feature class in my editing gdb and the field still remains in the child gdb after running the export->compare->import schema tools.

I also added a domain and assigned the domain in the production gdb.  The domain schema change is reflected in the child gdb.  I'm wondering why the field that was removed in the editing fc still remains in the child fc?  Does removing a field have to be done manually?

0 Kudos
JacobBoyle
Occasional Contributor III

No, it should of deleted the field, make sure you use the resultant .xml from the compare tool when you import the schema changes, not the original .xml you exported.

That tool should add and delete fields, make changes to domains: Schema changes—ArcGIS Help | ArcGIS for Desktop

0 Kudos