In Part
II of this series, we showed you a step-by-step example of Integrated
installation of SQL Server 2008 cluster. In this article, we will move onto the
other installation option Advanced/Enterprise installation. This option consists of two steps. The Prepare step
prepares all nodes of the failover cluster, and installs SQL Server binaries on
each node. Nodes in the cluster are configured during this step. After you
prepare the nodes, you only need to run the Complete step on the active node
that owns the shared disks. This step completes the failover cluster instance
and makes it operational.
This article series is
written based on the SQL Server 2008 RTM Developer Edition.
The steps
are shown in detail below.
1. Prepare both nodes of
the failover cluster, NODE1 and NODE2, to be operational.
Our SQL
Server installation media is in a shared folder called sqlserver2008 on a
remote computer demopc. Here is the command we run in the command prompt on each
node.
\\demopc\sqlserver2008\Setup.exe
/q /ACTION=PrepareFailoverCluster /FEATURES=SQL /INSTANCENAME=
"MSSQLSERVER"
/INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
/INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
/SQLSVCACCOUNT="PowerDomain\SqlService"
/SQLSVCPASSWORD="P@ssw0rd" /AGTSVCACCOUNT="PowerDomain\SqlService"
/AGTSVCPASSWORD="P@ssw0rd" /SQLDOMAINGROUP="PowerDomain\SQLAdmins"
/AGTDOMAINGROUP="PowerDomain\SQLAdmins"
Download this code.
Figure 1
shows the output from the command.
Each
parameter in the command is explained in the table below.
|
Parameter
|
Description
|
|
/ACTION=PrepareFailoverCluster
|
Specifies that the local computer is to be prepared as a node in
a SQL Server failover cluster.
|
|
/FEATURES=SQL
|
Specifies
that only SQL Server Database Engine is to be installed.
|
|
/INSTANCENAME="MSSQLSERVER"
|
Specifies
a default instance is to be installed.
|
|
/INSTANCEDIR="C:\Program
Files\Microsoft SQL Server"
|
Specifies
the SQL Server binaries will be placed under the directory C:\Program
Files\Microsoft SQL Server.
|
|
/INSTALLSHAREDDIR="C:\Program
Files\Microsoft SQL Server"
|
Specifies
the binaries for the shared components will be placed under the directory
C:\Program Files\Microsoft SQL Server.
|
|
/SQLSVCACCOUNT="PowerDomain\SqlService"
|
Specifies
the SQL Server service account.
|
|
/SQLSVCPASSWORD="P@ssw0rd"
|
Specifies
the password for the SQL Server service account.
|
|
/AGTSVCACCOUNT="PowerDomain\SqlService"
|
Specifies
the SQL Server Agent service account.
|
|
/AGTSVCPASSWORD="P@ssw0rd"
|
Specifies
the password for the SQL Server Agent service account.
|
|
/SQLDOMAINGROUP="PowerDomain\SQLAdmins"
|
Specifies
the domain group that
contains the SQL Server service account and will be used to control access to
registry keys, files, SQL Server objects, and other cluster resources.
|
|
/AGTDOMAINGROUP="PowerDomain\SQLAdmins"
|
Specifies
the domain group that
contains the SQL Server Agent service account.
|
After the
installation of each node, we need to check the installation log files under
the SQL Server binary directory. Figure 2 shows the list of log files on NODE1.
Figure 2
You can
start with the summary file, Summary_node1_xxxxxx.txt. This file provides the result
of each component installation, and gives you a hint as to which component had the problem if
the installation failed.
Notice
that the binaries have been installed under C:\Program Files\Microsoft SQL
Server. However, database files have not been created on the shared disks D:
and L:.
Figure 3
2. The Complete step runs only
on the active node. In our case, NODE1 owns the shared disk. Run the following
command on NODE1.
\\demopc\sqlserver2008\setup.exe
/q /ACTION=CompleteFailoverCluster /INSTANCENAME="MSSQLSERVER"
/FAILOVERCLUSTERNETWORKNAME="SQL2008Cluster"
/FAILOVERCLUSTERGROUP="SQL Server 2008 Group"
/FAILOVERCLUSTERDISKS="SQL Data" "SQL Log"
/FAILOVERCLUSTERIPADDRESSES="IPv4;192.168.1.12;Public;255.255.255.0"
/SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS"
/SQLSYSADMINACCOUNTS="PowerDomain\SqlService"
/INSTALLSQLDATADIR="D:\SQLServer"
/SQLUSERDBLOGDIR="L:\SQLServer\MSSQL10.MSSQLSERVER\MSSQL\Log"
/SQLTEMPDBLOGDIR="L:\SQLServer\MSSQL10.MSSQLSERVER\MSSQL\Log"
Download this code.
Notice
that the value for the ACTION parameter is CompleteFailoverCluster. Figure 4
shows the output from the command.
Figure 4
Each
parameter is explained in the table below.
|
Parameter
|
Description
|
|
/ACTION=CompleteFailoverCluster
|
Specifies that the previously defined SQL Server failover cluster
instance is to be completed.
|
|
/INSTANCENAME="MSSQLSERVER"
|
Specifies
a default instance will be installed.
|
|
/FAILOVERCLUSTERNETWORKNAME="SQL2008Cluster"
|
Specifies
the network name for
the SQL Server cluster.
|
|
/FAILOVERCLUSTERGROUP="SQL
Server 2008 Group"
|
Specifies
the cluster group that will contain the SQL Server resources.
|
|
/FAILOVERCLUSTERDISKS="SQL
Data" "SQL Log"
|
Specifies
the shared disks that will be used to store SQL Server data. In our example, SQL Data
is the resource name for the shared disk D:, and SQL Log is the resource
name for the shared disk L:.
|
|
/FAILOVERCLUSTERIPADDRESSES="IPv4;192.168.1.12;
Public;255.255.255.0"
|
Specifies
the network IP
address for the new failover instance is 192.168.1.12 on the Public network.
|
|
/SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
|
Specifies
the collation setting for the SQL Server failover cluster instance.
|
|
/SQLSYSADMINACCOUNTS="PowerDomain\SqlService"
|
Specifies
the logins that will be provisioned with the sysadmin permissions.
|
|
/INSTALLSQLDATADIR="D:\SQLServer"
|
Specifies
the root directory for database files is D:\SQLServer on the shared disk D:.
|
|
/SQLUSERDBLOGDIR="L:\SQLServer\MSSQL10.MSSQLSERVER\MSSQL\Log"
|
Specifies
the log files of all user databases will be placed under the directory
L:\MSSQL10.MSSQLSERVER\MSSQL\Log on the shared disk L:.
|
|
/SQLTEMPDBLOGDIR="L:\SQLServer\MSSQL10.MSSQLSERVER\MSSQL\Log"
|
Specifies
the log files of the tempdb database will be placed under the directory
L:\MSSQL10.MSSQLSERVER\MSSQL\Log on the shared disk L:.
|
After the
installation, we need to verify the result of the installation by checking the
log files under C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log.
If the installation was successful, we can see database files on the shared
disks D: and L:.
Figure 5
We can also
perform a failover test to ensure automatic failover in case of a hardware or
software failure. As shown in Figure 6, right click the SQL Server 2008
Group in Cluster Administrator, and choose Move Group.
Figure 6
The SQL Server cluster group should fail over to NODE2, and the new SQL
Server failover cluster instance should start running on NODE2. Figure 7 shows
the SQL Server cluster after the failover. Our cluster installation is
complete.
Figure 7
Conclusion
In this
series, we have illustrated how to install a SQL Server 2008 cluster from the
command prompt using both the Integrated and Advanced installation options.
»
See All Articles by Columnist Yan Pan