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


IReplicationAgent2.CreateReplica2 Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > GeodatabaseDistributed > ESRI.ArcGIS.GeoDatabaseDistributed > Interfaces > IR > IReplicationAgent2 Interface > IReplicationAgent2.CreateReplica2 Method
ArcGIS Developer Help

IReplicationAgent2.CreateReplica2 Method

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

[Visual Basic .NET]
Public Sub CreateReplica2 ( _
    ByVal versionName As String, _
    ByVal srcGDS As IGeoDataServer, _
    ByVal destGDS As IGeoDataServer, _
    ByVal ReplicaName As String, _
    ByVal desc As IGPReplicaDescription, _
    ByVal repOptions As IGPReplicaOptions, _
    ByVal layersFolder As String _
)
[C#]
public void CreateReplica2 (
    string versionName,
    IGeoDataServer srcGDS,
    IGeoDataServer destGDS,
    string ReplicaName,
    IGPReplicaDescription desc,
    IGPReplicaOptions repOptions,
    string layersFolder
);
[C++]
HRESULT CreateReplica2(
  BSTR versionName,
  IGeoDataServer* srcGDS,
  IGeoDataServer* destGDS,
  BSTR ReplicaName,
  IGPReplicaDescription* desc,
  IGPReplicaOptions* repOptions,
  BSTR layersFolder
);
[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* layersFolder [in]
layersFolder is a parameter of type BSTR

Product Availability

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

Remarks

The IReplicationAgent2::CreateReplica2 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.

The optional layersFolder parameter defines the location where layer files referencing the destGDS will be created.

See Also

IReplicationAgent2 Interface