To identify the ports currently being used by TCP endpoints on the
system, use the following Transact-SQL statement:
SELECT name, port FROM sys.tcp_endpoints
To use Transact-SQL to create an endpoint to use with
Windows Authentication, use a CREATE ENDPOINT statement.
The statement takes the following general form:
CREATE ENDPOINT endpointName
STATE=STARTED
AS TCP ( LISTENER_PORT = listenerPortList )
FOR DATABASE_MIRRORING
(
[ AUTHENTICATION = WINDOWS [authorizationMethod]
]
[ [,] ENCRYPTION = REQUIRED
[ ALGORITHM { algorithm } ]
]
[,] ROLE = role
)
Comments