Inside SQL Server Cluster Setup and Troubleshooting Techniques – Part I

How SQL Setup knows which files to copy
After SQL Server Cluster Setup wizard detects that it is going to install the SQL Server instance in an existing cluster, it invokes the SQLCluster.dll from its BINN directory to execute the following functions:

DoSQLClusterSetUpWork – Installs the SQL instance in the cluster
DoUnClusterSetup – Uninstalls the SQL instance from the cluster
CheckDatabasesForInstance – Checks existing SQL Instances already installed

These functions are explained later in this article.

SQL Setup copies files during the setup process. Setup doesn’t really know which files to copy. It reads a file on the CD named 70cluster.lst. This file resides at x:x86setup directory on the SQL Server Setup CD. You can se all files copied during the setup by opening the file in notepad as shown in below figure 1.2:

FIGURE 1.2 – SQL Setup Files copied during installation

These files are copied to %INSTPATH%. %INSTPATH% is a system variable. The complete path in this variable is the value which is entered during the installation process. The user running the SQL Setup supplies the complete path. If you ever encounter any problems with the copy, make sure the 70cluster.lst file contains the entries for SQL Modules. The best way is to copy this file from the SQL Installation media to the source folder from which you are running the SQL Server setup.

There are other files which are copied by the SQL Server setup wizard. These files are not part of the 70cluster.lst.

Which SQL module is responsible for SQL Cluster Setup and what all basic functions it implements for a successful installation?
As explained earlier, SQL Server setup invokes the SQLCluster.dll module from its BINN directory when it realizes that it is going to install the SQL Instances in a cluster environment.

It executes the following functions from SQLCluster.dll module:

As shown in Figure 1.1, this function is defined in the SQLCluster.dll module. The main purpose of this function is to install the new SQL Instances in the cluster. This is the main step for installation. The setup performs the pre-tasks for the SQL installation by using this function. For example, gather the list of nodes, list of disks, list of network interfaces etc. If you add any new disks to the cluster while the SQL Server setup is running, the disk will not be recognized by the SQL setup process unless you exit the setup and start it again from scratch. This is because the DoSQLClusterSetUpWork function executed from SQLCluster.dll gathers the cluster configuration information before it comes to select the disks or nodes available in the SQL Setup.

The next function is DoUnClusterSetup. The main responsibility of this function is to prepare the setup to uninstall any existing SQL instances from the cluster. You uninstall existing SQL instances from the cluster with the help of this function. If this function is not implemented then you will never be given an option to uninstall existing SQL instances.

The last function of SQLCluster.dll is CheckDatabasesForInstance. The main purpose of this function is to check any existing instances in the cluster. This function is useful in both the cases (when installing an instance and when uninstalling an instance). Before SQL Server setup installs or uninstalls any instance from the cluster, it executes to check to see if the given instance name is already installed on the system. SQL Server setup process will not allow you to install the same instance if it is already installed. This is how SQL cluster detects the existing installed SQL instances.

After the SQL Server setup process has finished with this, the next step is to detect the list of nodes, list of disks and list of interfaces available in the cluster. This work is done by the DoSQLClusterSetUpWork. The next section explains this in detail.

From where does SQL Setup get a list of disks, nodes and interfaces available in the cluster?
After you have selected the “Virtual Server” option, the wizard will gather the required information from the cluster. The information may include the List of Disks, List of Nodes available in the cluster, list of Interfaces etc. This information is required for proper installation of the SQL Database instances in the cluster.

The SQL Server Setup wizard completely depends on the Cluster Configuration Database. The SQL Setup retrieves the cluster configuration information from HKLMCluster hive. This hive is mapped with %SystemRoot%ClusterCLUSDB file.  The Setup doesn’t really have knowledge of the number of disks available in the cluster. So it always queries the registry to get this information. The “Cluster Disk Selection” dialogue box will be displayed to select the cluster disk on which the SQL Databases will be installed as shown in Figure 1.3:

FIGURE 1.3 Cluster Disks selection for SQL Server Databases.


Leave a Reply

Your email address will not be published. Required fields are marked *