In part 1 of this series I showed you how to configure the virtual storage required for the cluster. In part 2 of this series I showed you how to configure two SQL instances on the created windows cluster. In this part I will show you how to configure these two SQL instances into an Active/Active configuration.
In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.
The solution is fairly simple as per the below configuration.
Since we need to configure an Active/Active configuration for this cluster and we do not want any instance to depend on other components from the other instance we will have to add another DTC clustered service to the windows cluster. This is to allow the separation of the DTC service between both instances. I will also show you how to configure the SQL service to depend on its relating DTC service instance so that it moves it along with the SQL instance.
1- Go to the iSCSI target and create or add another shared disk to be used by the second SQL cluster
2- Go to one of the nodes and then open the iSCSI initiator and then click again on auto configure of the volumes and devices.
3- Now open the disk management utility and create the active partition on this disk and format it using NTFS.
4- Open the windows cluster management and add this disk to the cluster.
5- Right click on the service and applications and click to create a new one
6- Choose DTC
7- Give it a name and a unique IP
8- Select the available storage
9- The second DTC clustered instance is created
1- Move one SQL instance and one DTC to the server UK-LIT-DB1
2- The other SQL instance and the other DTC make sure they are moved to the other server UK-LIT-DB2
1- Right click on the first SQL instance and click add resource
2- Select the available DTC (with GUID) service
3- Click next and finish
4- Bring the new resource online
5- Create a dependency between the SQL server service and the newly added DTC resource
6- Create a dependency between the newly created DTC service and the SQL server cluster name and disk to make sure it is moved with it.
7- Right click on the second SQL instance and click add resource
8- Select the available DTC (with GUID) service
9- Click next and finish
10- Bring the new resource online
11- Create a dependency between the SQL server service and the newly added DTC resource
12- Create a dependency between the newly created DTC service and the SQL server cluster name and disk to make sure it is moved with it.
The dependency report for one of the SQL server clusters should look something like the below diagram.
Now you will need to make sure that the preferred owner is one of the nodes for each couple of the SQL instances and the DTC instances.
- Services that has UK-LIT-DB-01 as the preferred owner
- Services that has UK-LIT-DB-02 as the preferred owner
This makes the two nodes working together as an Active/Active SQL cluster with the appropriate services running on both. So if you open the first node you will find a SQL server clustered instance running and a clustered DTC running. On the second node you will find the other clustered SQL server instance running and the associated clustered DTC.
Nice article. Well explained
Do you need to configure DTC or can you set this up without DTC?
This is still active Passive when looking from Instance perspective.Its not the same as Oracle RAC
Do you need DTC? well it depends. Are you going to use distributed transactions? then yes. Usually because we never know if DTC will be needed later or not it is always best practice to configure DTC.
Shiva yes I know it is not like Oracle RAC.