共用方式為


Set-SqlHADREndpoint

設定資料庫鏡像端點的屬性。

語法

Set-SqlHADREndpoint
   [-Owner <String>]
   [-Certificate <String>]
   [-IpAddress <IPAddress>]
   [-AuthenticationOrder <EndpointAuthenticationOrder>]
   [-Encryption <EndpointEncryption>]
   [-EncryptionAlgorithm <EndpointEncryptionAlgorithm>]
   [-Port <Int32>]
   [-State <EndpointState>]
   [[-Path] <String>]
   [-Script]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SqlHADREndpoint
   [-Owner <String>]
   [-Certificate <String>]
   [-IpAddress <IPAddress>]
   [-AuthenticationOrder <EndpointAuthenticationOrder>]
   [-Encryption <EndpointEncryption>]
   [-EncryptionAlgorithm <EndpointEncryptionAlgorithm>]
   [-Port <Int32>]
   [-State <EndpointState>]
   [-InputObject] <Endpoint>
   [-Script]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-SqlHADREndpoint Cmdlet 會變更資料庫鏡像端點的屬性。

範例

範例 1:設定資料庫鏡像端點的埠號碼

PS C:\> Set-SqlHADREndpoint -Path "SQLSERVER:\Sql\Computer\Instance\Endpoints\MainDbmEndpoint" -Port 5050

此命令會在名為 Computer\Instance 的伺服器實例上,將名為 MainDbmEndpoint 的資料庫鏡像端點埠號碼設定為 5050。

範例 2:啟動資料庫鏡像端點

PS C:\> Set-SqlHADREndpoint -Path "SQLSERVER:\Sql\Computer\Instance\Endpoints\MainDbmEndpoint" -State Started

此命令會在伺服器實例 Computer\Instance 上啟動名為 MainDbmEndpoint 的資料庫鏡像端點。

參數

-AuthenticationOrder

指定端點所使用的驗證順序和類型。 . 如果指定的選項呼叫憑證,則必須設定 Certificate 參數,除非憑證已經與端點相關聯。 有效值為:

  • 憑證
  • CertificateKerberos
  • CertificateNegotiate
  • CertificateNtlm
  • Kerberos
  • KerberosCertificate
  • 交涉
  • NegotiateCertificate
  • Ntlm
  • NtlmCertificate
類型:EndpointAuthenticationOrder
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Certificate

指定端點將用來驗證連線的憑證名稱。 遠端點必須有一個特定憑證,該憑證含有符合指定憑證之私密金鑰的公開金鑰。

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

-Confirm

在執行 Cmdlet 前提示您確認。

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

-Encryption

指定端點加密設定。 有效值為:

  • 已停用
  • 支援
  • 必要
類型:EndpointEncryption
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EncryptionAlgorithm

指定端點所使用的加密形式。 有效值為:

  • Aes
  • AesRC4
  • RC4
  • RC4Aes

只有 RC4 演算法支援回溯相容性。 當資料庫處於相容性層級 90 或 100 時,只能使用 RC4 或RC4_128來加密新數據,但不建議這麼做。 為了提升安全性,請改用較新的演算法,例如其中一個 AES 演算法。

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

-InputObject

指定要修改的端點。 這個物件必須是資料庫鏡像端點。

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

-IpAddress

指定端點將接聽的IP位址。

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

-Owner

指定端點的擁有者。

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

-Path

指定資料庫鏡像端點的路徑。 這是選擇性參數。 如果未指定,則會使用目前的工作位置。

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

-Port

指定端點用來接聽連線的 TCP 通訊埠號碼。

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

-Script

指出此 Cmdlet 會輸出執行工作的 Transact-SQL 腳本。

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

-State

指定端點的狀態。 有效值為:

  • 已開始
  • 已停止
  • 已停用
類型:EndpointState
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

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

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

輸入

SMO.Endpoint

輸出

SMO.Endpoint