My question is, what goes in the connection string for the client
application, the ip for the SQLCluster or the ip for the SQL resource?
The SQL Resource should have an associated Virtual Network Name (or Client Access Name). This resource has an associated IP address that moves between nodes during failover. This is what your connection strings should point to because this Name/IP will always point to the node that is the owner of the SQL instance resource.
Use the following PowerShell to get the list of network names present in a cluster. The one in the Cluster Group cluster group will be the cluster network name and the one in your SQL cluster group will be the SQL network name, and that is the name to use in your connection strings.
Get-ClusterResource | Where-Object { $_.ResourceType -eq "Network Name" }
Also, when I manually failover from Node1 to node2, using the the
roles pane, the owner node changes and the services and shared disks
move over to the node2. But, at the Cluster level, the current Host
Server is still node1.
This is because you're failing over the clustered SQL Instance but the core cluster resources (cluster name/IP and quorum resource) remain owned by the original owner. It is possible to fail these over as well, but generally isn't required to be done manually if you're testing failover of the SQL resource.
Use the PowerShell cmdlet Get-ClusterGroup to get a handle on the different collections of resources in your clusters. When you run that cmdlet against a local cluster you'll see 3 or more cluster groups returned:
- Available Storage - This is the collection of disk resources not yet associated with any cluster resource but available for clustering
- Cluster Group - This is the core cluster resources, including the cluster IP, cluster name and quorum resources
- <Clustered Resource> - This cluster group (and any additional ones) contains the resources for a clustered service you have deployed, such as SQL Server or your application.
When you perform a manual failover, you're only moving the cluster group associated with those resources to the new node. An automatic failover may move the Cluster Group if there is a failure of the owner node, but if the automatic failover was SQL related, you may only see the SQL cluster group move to the new node.