共用方式為


Update-AzSqlSyncGroup

更新 Azure SQL 資料庫 同步群組。

語法

Update-AzSqlSyncGroup
      [-Name] <String>
      [-IntervalInSeconds <Int32>]
      [-DatabaseCredential <PSCredential>]
      [-SchemaFile <String>]
      [-UsePrivateLinkConnection <Boolean>]
      [-ServerName] <String>
      [-DatabaseName] <String>
      [-ResourceGroupName] <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update-AzSqlSyncGroup Cmdlet 會修改 Azure SQL 資料庫 同步群組的屬性。

範例

範例 1:更新 Azure SQL 資料庫 的同步群組。

$credential = Get-Credential
Update-AzSqlSyncGroup -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -Name "SyncGroup01" `
-DatabaseCredential $credential -IntervalInSeconds 100 -Schema ".\schema.json" | Format-List

ResourceId                  : /subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01}
ResourceGroupName           : ResourceGroup01
ServerName                  : Server01
DatabaseName                : Database01
SyncGroupName               : SyncGroup01
SyncDatabaseId              : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
IntervalInSeconds           : 100
ConflictResolutionPolicy:   : HubWin
HubDatabaseUserName         : myAccount
HubDatabasePassword         : 
SyncState                   : NotReady
LastSyncTime                : 1/1/0001 12:00:00 AM
Schema                      :

此命令會更新 Azure SQL 資料庫 的同步群組。 “schema.json” 是本機磁盤中的檔案。 它包含 json 格式的架構承載。 架構 json 的範例是: {“Tables”: [{“Columns”: [{“QuotedName”: “b3ee3a7f-7614-4644-ad07-afa832620b4bManualTestsm4column1”}, {“QuotedName”: “b3ee3a7f-7614-4644-ad07-afa832620b4bManualTestsm4column2”}], “QuotedName”: “MayQuotedTable1”}, {“Columns”: [{“QuotedName”: “b3ee3a7f-7614-4644-ad07-afa832620b4bManualTestsm4column1”}, {“QuotedName”: “b3ee3a7f-7614-4644-ad07-afa832620b4bManualTestsm4column2”}], “QuotedName”: “MayQuotedTable2”}], “MasterSyncMemberName”:null }

參數

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DatabaseCredential

中樞資料庫的 SQL 驗證認證。

類型:PSCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DatabaseName

SQL 資料庫 名稱。

類型:String
Position:2
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-IntervalInSeconds

執行數據同步處理的頻率(以秒為單位)。 默認值為 -1,這表示未啟用自動同步處理。

類型:Int32
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

同步群組名稱。

類型:String
別名:SyncGroupName
Position:3
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

資源群組的名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-SchemaFile

架構檔案的路徑。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ServerName

Azure SQL Server 的名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-UsePrivateLinkConnection

聯機到這個同步群組的中樞時,是否要使用私人連結連線。

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

輸出

AzureSqlSyncGroupModel