“Drop failed for Login ‘Login_Name’. The server principal owns an endpoint and cannot be dropped. (Microsoft SQL Server, Error: 15141)”
You may experience this error when you try to delete a Login in SQL Server. The reason is that this Login has an Endpoint.
In SQL Server, the Endpoints are based on the server, not the database. You can also access the endpoints with SSMS (SQL Server Management Studio) under the Server Object\Endpoints tabs in the Object Explorer window.
Note: Endpoints cannot be created from the SSMS interface. They can only be created using CREATE ENDPOINT commands using T-SQL. For more information about endpoints click here.
To avoid this error, you must first remove the Endpoints of the Login you want to delete.
You can do this by droping and creating endpoint with another user.