Skip to main content
Older versions of Internet Explorer will not support certain site features. Chrome, Safari, Firefox, and Edge will provide the best experience.

Step 5 - Enabling Each Spok Database for Redundant Mirroring on SQL Server

Enabling each Spok database for redundant mirroring on a SQL server is step 5 in the process of configuring SQL Server redundant mirroring sessions.

Each of the Spok databases come with three scripts that need to be run to take advantage of the mirroring redundancy established by the Common Redundant Mirroring Setup. There are three scripts for each database that need to be run to set up that database mirroring. This is based on having the Spok databases installed and running on the Principal server, making backups of the databases, and restoring them to the mirror server.

For each database that is being used, perform the steps below. All references to “<Database>” refers to the specific Spok database.

  1. On the Principal server, execute Mirroring\<Database>\ 1-Mirroring<Database> - PRINCIPALDB.sql. This creates a backup file set of the database.

  2. On the Principal server, go to the C:\ directory and copy the <Database>.bak and <Database>_log.bak files to the C:\ directory of the Mirror server.

  3. On the Mirror server, open the Mirroring\<Database>\ 2-Mirroring<Database> - MIRRORDB.sql and replace the text “<PrincipalServerName>” with the fully qualified domain name of the Principal server (Example:

  4. Run the script on the Mirror server.

  5. On the Principal server, open the Mirroring\<Database>\ 3-Mirroring<Database> - PRINCIPALDB.sql, replace the text “<MirrorServerName>” with the fully qualified domain name of the Mirror server (Example:

  6. Replace the text <WitnessServerName> with the fully qualified domain name of the Witness server (Example: 

  7. Run the script on the Principal server. The setup for database mirroring is complete.