If the primary device used for the master database becomes unavailable or has been corrupted while the server is running, the mirror device for master automatically becomes active. However, when the primary device for the master database has failed and you need to restart the server, use the sqlservr executable with the -r option. The -r option enables the server to find and use the mirror device for the master database when restarting SQL Server.
For example, if the MASTER mirror device is D:\SQL60\MIRROR
\MASTMIR.DAT, the following example restarts the server using the mirror device:
sqlservr -c -dc:\sql60\data\master.dat -ec:\sql60\log\error.log -rd:\sql60\mirror\mastmir.dat
where
Note The sqlservr utility requires that both the -d and -r options be present on the command line. The program always attempts to use the primary device specified by the -d option before it uses the -r option. When the primary device for master cannot be used, the server uses the device specified with the -r parameter. You cannot force the server to use the mirror device as the primary device if the original primary device works.
Configuring the server startup parameters to run SQL Server with the -r option allows SQL Server services to automatically use the mirror device for the master database when the primary device for master fails. The -r option requires the full path of the mirror device.
You can configure the server startup parameters by using either SQL Setup or SQL Enterprise Manager. The following procedure assumes you are using SQL Setup.
The Select Server Options dialog box appears.
The Server Parameters dialog box appears.
-re:\mirdir\mastmir.dat
The Select Server Options dialog box reappears.
If the -r option is present, sqlservr is always executed with both the -r and the -d options. This minimizes the chance that you will get a message stating that the MASTER device is unusable. If the -r option is present, the mirror file is used when the primary device fails.
Note You should periodically check the error log to determine if you are running SQL Server using the mirror of the master database, because it is possible to have a no longer operational primary device but not be aware of it. Since it is possible to not be aware of the primary device failure, you might want to use -r only if it becomes necessary because the primary device fails.