Skip to content

Latest commit

 

History

History
191 lines (149 loc) · 4.6 KB

SqlEndpoints.adoc

File metadata and controls

191 lines (149 loc) · 4.6 KB

DSC Resource 'SqlEndpoints'

SqlEndpoints creates SQL Server endpoints for database mirroring or service broker communication.

When to use 'SqlEndpoints'

Use this resource when you need to create database mirroring endpoints (required for Always On Availability Groups) or service broker endpoints. Mirroring endpoints must be configured on all replicas before creating Availability Groups with SqlAGs.

Currently it only supports creating a database mirror and a service broker endpoint. A database mirror endpoint can be used by AlwaysOn.

The endpoint will be started after creation, but will not be enforced unless the the parameter State is specified. To set connect permission to the endpoint, please use the resource SqlEndpointPermission.

Source

DSC Resource

Documentation

Requirements
  • Target machine must be running Windows Server 2012 or later.

  • Target machine must be running SQL Server Database Engine 2012 or later.

Table 1. Attributes of category 'SqlEndpoints'
Parameter Attribute DataType Description Allowed Values

DefaultInstanceName

String

Default SQL InstanceName
If the InstanceName of a value is not explicitly set, the DefaultInstanceName will be used.

Default: MSSQLSERVER

Values

Mandatory

Hashtable[]

List of SQL endpoints.

Table 2. Attributes of category 'SqlEndpoints/Values'
Parameter Attribute DataType Description Allowed Values

EndpointName

Key

String

The name of the endpoint.

InstanceName

Key

String

The name of the SQL Server instance to be configured.

EndpointType

Required

String

Specifies the type of endpoint.

Currently the only types that are supported are the Database Mirroring and the Service Broker type.

  • DatabaseMirroring

  • ServiceBroker

Ensure

String

Determines whether the endpoint should be added (Present) or removed (Absent).

  • Present (default)

  • Absent

Port

UInt16

The network port the endpoint is listening on.

Default value is 5022, but default value is only used during endpoint creation, it is not enforce.

Default: 5022

ServerName

String

The host name of the SQL Server to be configured.

Default value is the current computer name.

IpAddress

String

The network IP address the endpoint is listening on.

Default value is 0.0.0.0 which means listen on any valid IP address. The default value is only used during endpoint creation, it is not enforce.

Default: 0.0.0.0

Owner

String

The owner of the endpoint.

Default is the login used for the creation.

IsMessageForwardingEnabled

Bool

Specifies whether messages received by this endpoint that are for services located elsewhere will be forwarded.

  • True

  • False

MessageForwardingSize

UInt32

Specifies the maximum amount of storage in megabytes to allocate for the endpoint to use when storing messages that are to be forwarded.

State

String

Specifies the state of the endpoint.

When an endpoint is created and the state is not specified then the endpoint will be started after it is created. The state will not be enforced unless the parameter is specified.

  • Started (default)

  • Stopped

  • Disabled

Example
SqlEndpoints:
Values:
    - EndpointName: HADR
      EndpointType: DatabaseMirroring
      Port: 5022
      ServerName: SQL1
      InstanceName: MSSQLSERVER
    - EndpointName: HADR
      EndpointType: DatabaseMirroring
      Port: 5023
      ServerName: SQL2
      InstanceName: MSSQLSERVER