| title | Create a Database Mirroring Endpoint for AlwaysOn Availability Groups (SQL Server PowerShell) | Microsoft Docs | |||
|---|---|---|---|---|
| ms.custom | ||||
| ms.date | 06/13/2017 | |||
| ms.prod | sql-server-2014 | |||
| ms.reviewer | ||||
| ms.technology | high-availability | |||
| ms.topic | conceptual | |||
| helpviewer_keywords |
|
|||
| ms.assetid | 6197bbe7-67d4-446d-ba5f-cabfa5df77f1 | |||
| author | MashaMSFT | |||
| ms.author | mathoma | |||
| manager | craigg |
This topic describes how to create a database mirroring endpoint for use by [!INCLUDEssHADR] in [!INCLUDEssCurrent] by using PowerShell.
In This Topic
-
Before you begin: Security
-
To create a database mirroring endpoint, using: PowerShell
Important
The RC4 algorithm is deprecated. [!INCLUDEssNoteDepFutureDontUse] We recommend that you use AES.
Requires CREATE ENDPOINT permission, or membership in the sysadmin fixed server role. For more information, see GRANT Endpoint Permissions (Transact-SQL).
To create a database mirroring endpoint
-
Change directory (
cd) to the server instance for which you want to create the database mirroring endpoint. -
Use the
New-SqlHadrEndpointcmdlet to create the endpoint and then use theSet-SqlHadrEndpointto start the endpoint.
The following PowerShell commands create a database mirroring endpoint on an instance of SQL Server (Machine\Instance). The endpoint uses port 5022.
Important
This example works only on a server instance that currently lack a database mirroring endpoint.
# Create the endpoint.
$endpoint = New-SqlHadrEndpoint MyMirroringEndpoint -Port 5022 -Path SQLSERVER:\SQL\Machine\Instance
# Start the endpoint
Set-SqlHadrEndpoint -InputObject $endpoint -State "Started"To Configure a Database Mirroring Endpoint
-
Create a Database Mirroring Endpoint for Windows Authentication (Transact-SQL)
-
Use Certificates for a Database Mirroring Endpoint (Transact-SQL)
-
Specify the Endpoint URL When Adding or Modifying an Availability Replica (SQL Server)
To View Information About the Database Mirroring Endpoint
Create an Availability Group (Transact-SQL)
Overview of AlwaysOn Availability Groups (SQL Server)