Unregister Replica (Data Management)


Unregisters a replica from an enterprise geodatabase.


  • This tool must be executed as the replica owner or the geodatabase administrator. For service-based replicas, the replica owner is the database user on which the service processes were run.

  • If the replica has a version associated with it, this tool does not delete the version.

  • Make sure you no longer need to use the replica before running this tool. Once the replica is unregistered, it can no longer be used to synchronize changes.

  • This tool supports replicas created through ArcGIS Desktop or ArcGIS Pro using geodatabase replication or created through a feature service.

  • Replica names and IDs can be obtained using the Manage Replicas pane or from the feature services replicas REST resource.

  • If the feature service from which a replica was created is not accessible or no longer exists, you can use the arcpy.da.ListReplicas Python function to get a list of all types of replicas created in the geodatabase.


UnregisterReplica(in_geodatabase, in_replica)
ParameterExplanationData Type

The enterprise geodatabase that contains the replica to unregister.


The name or id of the replica that will be unregistered. If providing the replica name, it must be fully qualified, for example, myuser.myreplica.


Derived Output

NameExplanationData Type

The updated geodatabase with the replica unregistered.


Code sample

UnregisterReplica example 1 (Python window)

Unregister a replica by id.

import arcpy
UnregisterReplica example 2 (stand-alone script)

Unregister all replicas in a geodatabase.

# Import modules
import arcpy

# Set local variables
sdeConnection = "C:\\MyProject\\myConnection.sde"

# Loop through all replicas and unregister each one
replicas = arcpy.da.ListReplicas(sdeConnection, True)
for replica in replicas:
    arcpy.UnregisterReplica_management(sdeConnection, replica.name)


This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics