May 2, 2020

Database Mirroring Configuration


--step 1
-----------------------------------------------------------------------------------------------------------------------------
--On Secondary ( Mirror Server ) ,
--Server_Name2

USE MASTER;
GO
ALTER DATABASE [DB_Name] SET PARTNER = 'TCP://Server_Name1.domain.com:5022'
GO
-----------------------------------------------------------------------------------------------------------------------------


--step 2
-----------------------------------------------------------------------------------------------------------------------------
--On Primary (Principal Server) ,
--Server_Name1

USE MASTER;
GO
ALTER DATABASE [DB_Name] SET PARTNER = 'TCP://Server_Name2.domain.com:5022'
GO
-----------------------------------------------------------------------------------------------------------------------------

--step 3
-----------------------------------------------------------------------------------------------------------------------------

--Configure Witness (Server_Name3)

ALTER DATABASE [DB_Name] SET WITNESS = 'TCP://Server_Name3.domain.com:5022';
GO


-----------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

If you have any doubt or question, please contact us.