Step 6
For testing purposes, let's run this batch file manually.
(Caution: Do not execute this batch file in your
production environment unless you test it in your test cluster box. This
procedure will restart your physical nodes immediately).
Now, let's assume that all resources are active in
SQLNode1 as shown in Fig 2.0.
Execute the batch file, c:\reboot\preparereboot.bat, as
shown below in Fig 2.1 and 2.2.
Fig 2.2
Immediately you will get this message in SQLNode1. (Refer
to Fig 2.3). The /t 60 switch in the SHUTDOWN command provides a one minute delay
before shutting down. This can be changed according to your requirements.
Fig 2.3
Cluster service will automatically move the group to
SQLNode2 as shown below. Refer to Fig 2.4 and 2.5.
Fig 2.4
Fig 2.5
Now if you take a look at the clusternodes.txt, you will
see that the sequence is changed from SQLNode1,SQLNode2 to SQLNode2,SQLNode1.
Refer to Fig 2.6.
Fig 2.6
Let's run the batch file again, to see whether it returns SQLNode1
back to the active node. Refer to Fig 2.7
Fig 2.7
In SQLNode2 you will get the following message. Refer to
Fig 2.8.
Fig 2.8
Cluster service will immediately move all of the resources
to SQLNode1 as shown below. Refer Fig 2.9 and 3.0.
Fig 2.9
Fig 3.0
In addition, you will notice that clusternodes.txt will contain
the old sequence SQLNode1,SQLNode2.
Fig 3.1
Conclusion
By using the instructions described in this article, you
can switch the active node to the passive node and the passive node to the active
node on the first reboot and vice versa in the successive reboots. In an
upcoming article, we will go through the steps involved in rebooting
Active/Active SQL Cluster.
»
See All Articles by Columnist MAK