Synchronizes updates between two replica geodatabases in a direction specified by the user.
| Parameter | Type | Description | Required |
|---|---|---|---|
| ParentGDB | String | The geodatabase hosting the replica to synchronize, may be local or remote. | Yes |
| ChildGDB | String | The geodatabase hosting the relative replica, geodatabase may be local or remote. | Yes |
| ReplicaName | String | A valid replica with a parent contained within one input geodatabase and a child in the other input geodatabase. | Yes |
| GDB1_TO_2 | Boolean | The direction in which you want changes to be sent from geodatabase 1 to geodatabase 2, from geodatabase 2 to geodatabase 1, or to send changes in both directions. For check-out/check-in replicas or one-way replicas there is only one appropriate direction. If the replica is two-way then any of the three choices are available.
|
No |
| FAVOR_GDB1 | Boolean | Specifies how conflicts are resolved when they are encountered.
|
No |
| BY_OBJECT | Boolean | Specifies how you would like to define conflicts.
|
No |
| DO_NOT_RECONCILE | Boolean | Indicates whether to automatically reconcile once data changes are sent to the parent replica if there are no conflicts present. This option is only available for check-out/check-in.
|
No |
Returns: Boolean
Simple call with all parameters specified.
import RPLib # Local variables ParentGDB = "C:/GIS/GISADMIN@GIS.sde" ChildGDB = "Z:/LandRecords.gdb" RepName = "GISReplica" RPLib.syncreplicas(ParentGDB,ChildGDB,RepName,True,True,True,True)
Simple call with only required parameters specified.
import RPLib # Local variables ParentGDB = "C:/GIS/GISADMIN@GIS.sde" ChildGDB = "Z:/LandRecords.gdb" RepName = "GISReplica" RPLib.syncreplicas(ParentGDB,ChildGDB,RepName)
If Else logic with all parameters specified.
import RPLib # Local variables ParentGDB = "C:/GIS/GISADMIN@GIS.sde" ChildGDB = "Z:/LandRecords.gdb" RepName = "GISReplica" if RPLib.syncreplicas(ParentGDB,ChildGDB,RepName,True,True,True,True): print("successful, run another tool") else: print("failed, run another tool")
- Notice you do not need to specify these parameters because by default:
- GDB1_TO_2 = True
- FAVOR_GDB1 = True
- BY_OBJECT = True
- DO_NOT_RECONCILE = True
import RPLib # Local variables ParentGDB = "C:/GIS/GISADMIN@GIS.sde" ChildGDB = "Z:/LandRecords.gdb" RepName = "GISReplica" if RPLib.syncreplicas(ParentGDB,ChildGDB,RepName): print("successful, run another tool") else: print("failed, run another tool")