CREATE ENDPOINT Mirroring 
   AUTHORIZATION <principal instance>
   STATE=STARTED
   AS TCP (LISTENER_PORT = 5024, LISTENER_IP = ALL)
   FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM RC4)
GO

CREATE ENDPOINT Mirroring 
   AUTHORIZATION <mirror instance>
   STATE=STARTED
   AS TCP (LISTENER_PORT = 5024, LISTENER_IP = ALL)
   FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM RC4)
GO

CREATE ENDPOINT Mirroring 
   AUTHORIZATION <witness instance>
   STATE=STARTED
   AS TCP (LISTENER_PORT = 5024, LISTENER_IP = ALL)
   FOR DATA_MIRRORING (ROLE = WITNESS, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM RC4)
GO

SELECT * FROM sys.database_mirroring
SELECT * FROM sys.database_mirroring_endpoints
SELECT * FROM sys.database_mirroring_witnesses
GO

