-- [KARIYER\ahmetr] kadirmak isteyip, ancak kaldiramadigim bir login idi. Asagidaki islemleri yapmak, kullaniciyi kaldirmama izin verdi SELECT EPS.name, SPS.STATE, CONVERT(nvarchar(38), SUSER_NAME(SPS.grantor_principal_id))AS [GRANTED BY], SPS.TYPE AS PERMISSION, CONVERT(nvarchar(46),SUSER_NAME(SPS.grantee_principal_id))AS [GRANTED TO] FROM sys.server_permissions SPS , sys.endpoints EPS WHERE SPS.major_id = EPS.endpoint_id ORDER BY PERMISSION,[GRANTED BY], [GRANTED TO]
-- sorgu sonucunda çıkan hadr_enpoint [KARIYER\ahmetr] kullanicinisina assign oldugunu gordum. Aşağıdaki sorguda Hadr rndpoint objesini başka bir kullanıcıya assign ettim.[KARIYER\sqladmin]
--Used these queries to change the grantor and also re-grant connect on the endpoint for our SQL service account.
ALTER AUTHORIZATION ON ENDPOINT::Hadr_endpoint TO sa;
GRANT CONNECT ON ENDPOINT::Hadr_endpoint TO [KARIYER\knetsql];
USE [master] GO /****** Object: Login [KARIYER\sqladmin] Script Date: 15.5.2020 14:19:39 ******/ DROP LOGIN [KARIYER\ahmetr] GO