Step 5 - Enabling Each Spok Database for Redundant Mirroring on SQL Server
Each Spok database includes three scripts that need to be run in order to take advantage of the mirroring redundancy established by the Common Redundant Mirroring Setup. Before running these scripts, ensure that the Spok databases are installed and running on the Principal server, that they are making backups of the databases, and are restoring them to the mirror server.
For each database that is being used, perform the steps below. In the steps below, <Database>
refers to the specific Spok database.
-
On the Principal server, execute
Mirroring\<Database>\ 1-Mirroring<Database> - PRINCIPALDB.sql
. This creates a backup file set of the database. -
On the Principal server, go to the
C:\
directory and copy the<Database>.bak
and<Database>_log.bak
files to theC:\
directory of the Mirror server. -
On the Mirror server, open
Mirroring\<Database>\ 2-Mirroring<Database> - MIRRORDB.sql
and replace the text “<PrincipalServerName>
” with the fully qualified domain name of the Principal server (for example,principal.amcomsoft.com
). -
Run the script on the Mirror server.
-
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 (for example,mirror.amcomsoft.com
). -
Replace the text
<WitnessServerName>
with the fully qualified domain name of the Witness server (for example,witness.amcomsoft.com
). -
Run the script on the Principal server. The setup for database mirroring is complete.