Use Cases

Manual Failover

To initiate manual failover, which is promoting the mirror to the principal, use the DB SQLS Manual failover RightScript on the Principal server.

Detaching Witness from Mirroring Session

If you want to stop and terminate a witness server, you will need to run the DB SQLS Switch Witness off against all three instances:

  1. Go to the witness server's Scripts tab.
  2. Run 'DB SQLS Switch Witness Off' script. This will detach the witness from the principal and mirror.
  3. You will also need to go the principal and mirror's Scripts tab and run the same script.

Mirror Instance Fails

In the event that a mirror server becomes unreachable, it needs to detach from the mirroring session before a new mirror server is attached.

  1. Detach the witness by running DB SQLS Switch witness off script on all 3 instances (witness, mirror and principal).
  2. Go to the principal server's Scripts tab.
  3. Run DB SQLS Switch Mirroring off script. This will detach the mirror from the principal.
  4. (Re)launch the mirror server and set SERVER_MODE to Mirror.
  5. Navigate to the Scripts tab of the principal server and run the DB SQLS Init principal script.
  6. Verify the script successfully executed on the principal and mirror servers by viewing each server's Audit Entries tab.
  7. Reattach the witness by running the DB SQLS Init witness script on all 3 instances simultaneously.

Witness Instance Fails

In the event that a witness server becomes unreachable, it needs to detach from the mirroring session before a new witness server is attached.

  1. Go to the witness server's Scripts tab.
  2. Run DB SQLS Switch Witness Off script. This will detach the witness from the principal and mirror.
  3. You will also need to go to the principal and mirror's Scripts tab and run the same script.
  4. Follow the steps in the Database Manager for Microsoft SQL Server Witness - Beta - Tutorial to add a new witness.

Install a Service Pack / Hotfix on a System with Minimal Downtime for Mirrored Databases

  1. Detach the witness by running DB SQLS Switch witness off script on all 3 instances (witness, mirror and principal).
  2. Upgrade the mirror instance.
  3. Go to the principal server's Scripts tab.
    • Perform manual failover using the DB SQLS Manual failover script.
    • Upgrade the server instance that was first the principal server (and is now the new mirror server).
  4. Reattach the witness by running DB SQLS Init witness script on all 3 instances simultaneously.

Add Additional Storage to a Running Principal

If you would like to add additional storage to a running principal, follow the steps below:

  1. Detach the witness by running DB SQLS Switch witness off script on all 3 instances (witness, mirror and principal).
  2. Go to the principal server's Scripts tab.
    • Perform a manual failover using the DB SQLS Manual failover script to switch the server's roles.
    • Destroy the mirroring session using DB SQLS Switch mirroring off script.
  3. Increase the disk space for your mirror instance.
  4. Go to your Deployment's Servers tab and relaunch the mirror.
  5. Go to your principal's Scripts tab and run DB SQLS Init principal script
  6. And once the mirror becomes operational, go to the mirror server's Scripts tab and run the DB SQLS Init mirror script.
    • Perform manual failover again to switch roles of the servers using the DB SQLS Manual failover script.
  7. Attach the witness by running DB SQLS Init witness script on all 3 instances simultaneously.

Add Additional Storage to a Running Mirror

If you would like to add additional storage to a running mirror, follow the steps in the Add Additional Storage to a Running Principal section.