This document is archived and information here might be outdated.  Recommended version.


IReplicationAgent.CreateReplica Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabaseDistributed)  

IReplicationAgent.CreateReplica Method

Creates a replica pair in the workspaces bound to the input geodataservers.

[Visual Basic .NET]
Public Sub CreateReplica ( _
    ByVal versionName As String, _
    ByVal srcGDS As IGeoDataServer, _
    ByVal destGDS As IGeoDataServer, _
    ByVal ReplicaName As String, _
    ByVal desc As IGPReplicaDescription, _
    ByVal repOptions As IGPReplicaOptions _
)
[C#]
public void CreateReplica (
    string versionName,
    IGeoDataServer srcGDS,
    IGeoDataServer destGDS,
    string ReplicaName,
    IGPReplicaDescription desc,
    IGPReplicaOptions repOptions
);
[C++]
HRESULT CreateReplica(
  BSTR versionName,
  IGeoDataServer* srcGDS,
  IGeoDataServer* destGDS,
  BSTR ReplicaName,
  IGPReplicaDescription* desc,
  IGPReplicaOptions* repOptions
);
[C++]

Parameters versionName [in]
versionName is a parameter of type BSTR srcGDS [in]
srcGDS is a parameter of type IGeoDataServer* destGDS [in]
destGDS is a parameter of type IGeoDataServer* ReplicaName [in]
ReplicaName is a parameter of type BSTR desc [in]
desc is a parameter of type IGPReplicaDescription* repOptions [in]
repOptions is a parameter of type IGPReplicaOptions*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The IReplicationAgent::CreateReplica method is used to create replicas in a connected environment.  This method may be used to create check-out replicas, two way replicas, or one way replicas.  To create replicas in a disconnected environement please see the IGeodataserver::CreateReplica method for more information

This method requires two input geodataserver objects,a srcGDS and a destGDS. The replicas will be created in the geodatabases represented by the input geodataserver objects. The srcGDS will host the parent replica, and the destGDS will host the child replica in the replica pair. See the GeoDataServer2 coclass for more information. The ReplicaName is a string that uniquely identifies the replica.

The versionName is the version on the geodatabase represented by the srcGDS from which the replica will be created.

The desc parameter defines the data which will be replicated. See the GPReplicaDescription coclass for more information.

The repOptions parameter defines replica options such as the replica access type. See the GPReplicaOptions coclass for more information.

[C#]

The How to create a replica in a connected environment topic describes how to create a replica using this method.

See Also

IReplicationAgent Interface