Create EndPoint

,

While facing a trouble dropping a Login account, use the below script:-

Server principal 'xx\yy' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal. (Microsoft SQL Server, Error: 15173).

Run the above steps.

USE [master]
GO

SELECT p.name, e.* FROM sys.endpoints e inner join sys.server_principals p on e.principal_id = p.principal_id

GO
select * from sys.endpoints;

DROP ENDPOINT [Hadr_endpoint]
GO

CREATE ENDPOINT [Hadr_endpoint] 
	STATE=STARTED
	AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)
	FOR DATA_MIRRORING (ROLE = ALL, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM AES)
GO


GRANT CONNECT ON ENDPOINT::[hadr_endpoint] TO [xx\yy1]


DROP LOGIN [xx\yy]

use master;
grant take ownership on endpoint::hadr_endpoint to [xx\yy1]
    with grant option;

GO

Rate

2.33 (3)

Share

Share

Rate

2.33 (3)