Available with Standard or Advanced license.
Two-way replication allows data changes to be sent multiple times from the parent replica to the child replica or from the child replica to the parent replica. If the same row is edited in both replica geodatabases, it is detected as a conflict when the replicas are synchronized. Reconcile policies are provided to define how conflicts are processed. When creating two-way replicas, the child replica must be an enterprise geodatabase. See Replication types to learn more.
You can use the Create Replica option from the Distributed Data context menu to create a two-way replica from an enterprise geodatabase. Two-way replicas continue to exist after synchronization, allowing you to continue editing and synchronizing the replicas.
Before getting started, see Prepare data for replication to review the data requirements. For a list of data types supported with geodatabase replication in ArcGIS Pro, see Replication and geodatabase compatibility.
You can use the Distributed Geodatabase context menu or Create Replica geoprocessing tool to create a two-way replica.
- Start ArcGIS Pro without a template or open an existing ArcGIS Pro project.
- In the Catalog pane, right-click an existing geodatabase connection and click the Distributed Geodatabase context menu.
Note:
To create a replica, you must use a connection to an enterprise geodatabase as a user with data creator privileges.
- Select Create Replica .The Create Replica geoprocessing tool dialog box appears with default settings.
- For Replica Datasets, to replicate all of the data, use the browse button to select the layers to be replicated within this replica.
Tip:
- There must be at least one layer in the map for the Add Many icon to appear.
- Use Add Many next to Replica Datasets to add multiple datasets at once.
- If you are replicating a subset of data, apply definition queries as described in Determine datasets to replicate. Then use the drop-down menu to add datasets containing a subset of data to this one-way replica. If the browse button is used to select datasets containing a subset of data instead of the drop-down menu, the definition queries will not be honored, and the default behavior will be applied.
- To include tables in your replica, it’s important to understand that the default behavior for tables is replicate schema only. To replicate all records, specify the SQL expression 1=1 for your definition query. To replicate a subset of records in your table, set the appropriate SQL expression.
- For Replica Type, ensure Two way replica is selected. It is the default setting.
- For Output Type, from the drop-down menu, choose to replicate to a Geodatabase (default) or an XML file.
- If you choose Geodatabase, for Geodatabase to replicate data to, click the browse button to browse to the geodatabase or geodata service that will host the child replica.
Tip:
Two-way replicas require an enterprise geodatabase for the source and destination geodatabases. When browsing to an enterprise geodatabase, ensure that you are connected as a user that has privileges to create data in the database.
- If you
choose XML file, for XML file to replicate data to, click the browse button to browse to the location and provide a name for the XML file that will host the child replica.
Tip:
You can later use this output XML file as input into another geodatabase by using the Import XML Workspace Document tool.
Replicating data in a disconnected environment is only possible if you replicate your data to an XML workspace document. To learn more, see Replicas in a disconnected environment.
- If you choose Geodatabase, for Geodatabase to replicate data to, click the browse button to browse to the geodatabase or geodata service that will host the child replica.
- For Replica Name, type a name to identify the replica. The name of each replica must be unique to the user creating the replica.
Note:
When deciding on a replica name, make note of these additional rules:- Names must begin with a letter, not a number or special character such as an asterisk (*) or percent sign (%).
- Names should not contain spaces. If you have a two-part name for your replica, connect the words with an underscore (_).
- Names should not contain reserved words, such as select or add. Consult your DBMS documentation for additional reserved words.
- The length of a replica's name depends on the underlying database. Be sure to consult your DBMS documentation for maximum name lengths.
- Click Advanced Setting to expand additional options if you want to override the replication default options. If you are not making any change to the default options, skip to step 15.
- Under Advanced Setting, for Replica Access Type, choose Full or Simple for the geodatabase model.
- Initial Data Sender specifies which replica can send changes when in disconnected mode. This ensures that the relative replica doesn't send updates until the changes are first received from the initial data sender. If you are working in a connected mode, this parameter is not used.
- Child data sender—The child replica is the initial data sender. This is the default.
- Parent data sender—The parent replica is the initial data sender.
- From Expand Feature Classes and Tables, select one of the following four options:
- Use defaults—Adds the expanded feature classes and tables related to the feature classes and tables in the replica. The default for feature classes is to replicate all features intersecting the spatial filter. If no spatial filter has been provided, all features are included. The default for tables is to replicate the schema only.
- Add with schema only—Adds only the schema for the expanded feature classes and tables.
- All rows—Adds all rows for expanded feature classes and tables.
- Do not add—Doesn't add expanded feature classes and tables.
- For Replicate Related Data, choose Get related or Do not get related to specify whether to replicate rows related to rows already in the replica. Get related is the default setting.
See Replication and related data to learn more about how this setting works when replicating data.
- Replica Geometry Features can be used to define the replica geometry:
- The replica geometry features can be a feature layer with points, lines, or polygons.
- A feature layer used for the replica geometry features can contain one or more features. If there are more than one, the geometries are merged, and only data that intersects the merged geometries will be replicated.
- If filters (such as a definition query) have been defined on the replica geometry features, only features that satisfy these filters will be used to define the replica geometry.
- You can also use the Extent environment setting to define the replica geometry:
- If Replica Geometry Features is set, it will be used as the replica geometry.
- If Replica Geometry Features is not set, the Extent environment is used as the replica geometry.
- If both Replica Geometry Features and the Extent environment are set, the Replica Geometry Features setting is used.
- If neither Replica Geometry Features nor the Extent environment is specified, the full extent of the data is used.
- Optionally, check Register existing data only if the data already exists in the child geodatabase and is used to define the replica datasets. If Register existing data only is not checked, which is the default, data in the parent geodatabase is copied to the child geodatabase.
Note:
See Register existing data only for a list of additional geodatabase replication requirements that must be met prior to selecting this option on the Create Replica geoprocessing tool. - Click Run to create the two-way replica.