Professional Documents
Culture Documents
below.
8. First create SQLCert folder in D drive.
9. Run the script1 on Principal server
10.Run the script1 on Mirror server.
11.Copy the HOST_PRIN_cert.cer file from d:\SQLCert\ folder from
Principal server and paste into D:\SQLCert \ folder in Mirror server.
12.Copy the HOST_MIRR_cert.cer file from d:\SQLCert\ folder from Mirror
server and paste into D:\SQLCert \ folder in Principal server.
13. Run the script2 on Principal server.
14.Run the script2 on Mirror server.
15.Change the database recovery model properties to Full
16.Change database name in script 3 of principal server script and Run
the script3 on Principal server.
17.Copy the database bak and trn file from D:\SQLCert\ folder and paste
into D:\SQLCert\ folder in Mirror server.
18.Change database name in script 3 of mirror server script and Run the
script3 on Mirror server.
19.Change IP address to Primary server machine name and Now first run
the script4 on Mirror server.
20.Change IP address to backup server machine name and Run the script4
on Principal server.
21.If everything is completed successfully then on Principal Server
Database will show (Principal, Synchronized) and on mirror server
database will show (Mirror, Synchronized/Restoring)
22.Change
IN FAILOVER CASE
When your principal server is not available or not working the run the below
script on Mirror server after this process your mirror is working as Principal
server.
Run the below script on Principal server, then your failure server work as
Mirror server.
go
drop LOGIN HOST_prin_login
GO
drop USER HOST_PRIN_user
GO
drop LOGIN HOST_mirr_login
GO
drop USER HOST_mirr_user
GO
drop MASTER KEY
GO
GO
EXECUTE SP_CONFIGURE 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO