DROP ENDPOINT Witness_Endpoint_Mirroring

CREATE ENDPOINT Witness_Endpoint_Mirroring
	STATE=STARTED
	AS TCP (LISTENER_PORT=5024)
	FOR DATABASE_MIRRORING (ROLE=WITNESS)
GO

select * from sys.database_mirroring_endpoints

GRANT CONNECT ON ENDPOINT::Witness_Endpoint_Mirroring to public