DROP ENDPOINT Mirror_Endpoint_Mirroring

CREATE ENDPOINT Mirror_Endpoint_Mirroring
	STATE=STARTED
	AS TCP (LISTENER_PORT=5023)
	FOR DATABASE_MIRRORING (ROLE=ALL)
GO

GRANT CONNECT ON ENDPOINT::Mirror_Endpoint_Mirroring to public

select * from sys.database_mirroring_endpoints

--To Start Mirroring, create the relationships between the EndPoints

--***#1***
ALTER DATABASE AdventureWorks 
	SET PARTNER = 'TCP://DEMON:5022'
GO

