MSFT_ReplicationGroup 類別的 SetReplicationRelationship 方法

修改復寫群組之間的關聯性。

語法

UInt32 SetReplicationRelationship(
  [in]  UInt16 Operation,
  [in]  String TargetGroup,
  [in]  String SourceStorageObjects[],
  [in]  String TargetStorageObjects[],
  [in]  String SyncPairs[],
  [out] String CreatedReplicaPeer,
  [out] String ExtendedStatus
);

參數

作業 [in]

下列其中一個值:

中止 (2)

ActivateConsistency (3)

啟用 (4)

AddSyncPair (5)

DeactivateConsistency (6)

停用 (7)

卸離 (8)

水 ( 9)

故障轉移 (10)

容錯回復 (11)

( 12)

RemoveSyncPair (13)

ResyncReplica (14)

RestoreFromReplica (15)

繼續 (16)

ResetToSync (17)

ResetToAsync (18)

ReturnToResourcePool (19)

ReverseRoles (20)

分割 (21)

暫停 (22)

取消準備 (23)

TargetGroup [in]

字串,包含內嵌 MSFT_ReplicaPeer 物件,指定目標群組的複本對等。

SourceStorageObjects [in]

字串數位,包含內嵌 MSFT_StorageObject 物件,指定要依標識碼複寫的來源物件。 一致性順序是根據這個陣列中的物件順序。

TargetStorageObjects [in]

字串數位,包含內嵌 MSFT_StorageObject 物件,指定要復寫的標識碼來指定要復寫的目標物件。 一致性順序是根據這個陣列中的物件順序。

SyncPairs [in]

字串數位,包含內嵌 MSFT_Synchronized 物件,指定 AddSyncPairRemoveSyncPair 的項目複本。

CreatedReplicaPeer [out]

此參數會接收字串,其中包含內嵌 MSFT_Synchronized 物件,代表復寫群組之間的關聯。

ExtendedStatus [out]

包含內嵌 MSFT_StorageExtendedStatus 物件的字串。

此參數可讓記憶體提供者傳回擴充 (實作特定) 錯誤資訊。

傳回值

成功 (0)

不支援 (1)

未指定的錯誤 (2)

時 (3)

失敗 (4)

無效的參數 (5)

找不到物件 (8)

已檢查方法參數 - 作業啟動 (4096)

拒絕存取 (40001)

沒有足夠的資源來完成作業。 (40002)

快取過期 (40003)

升級叢集時不支援此作業。 (40009)

規格需求

需求
最低支援的用戶端 Windows 10 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2016 [僅限傳統型應用程式]
命名空間 Root\Microsoft\Windows\Storage
MOF Storagewmi.mof

另請參閱

MSFT_ReplicationGroup