Posts

Showing posts with the label Mirroring

Configure SQL Mirroring

Image
There are 3 different types of SQL Mirroring options available for use: 1. High Performance – Asynchronous (this requires the Enterprise Edition) 2. High Safety without Automatic Failover 3. High Safety with Automatic Failover (this requires a witness server running the same SQL version) All three require roughly the same steps: * Ensure the same login accounts are present on the Principal and the Mirror * Backup the Principal DB and Logs * Restore on the Mirror * Configure the Mirroring Endpoints * Set the partner on the Mirror * Set the partner on the Principal (and the witness if necessary) So lets work through the steps above…… Get our login’s in order To get our accounts in order between our two servers we can run the following SQL script to give us an output to run on our mirror. SELECT ‘create login [‘ + p.name + ‘] ‘ + case when p.type in(‘U’,’G’) then ‘from windows ‘ else ” end + ‘with ‘ + case when p.type = ‘S’ then ‘password = ‘ + master.sys.fn_varbintohe...