Prerequisites
Before you install the failover cluster, ensure that the SQL Server installation media is ready to start the installation. Install a SQL Server cluster instance by first running the setup in the first node. After the initial installation in the first node, run setup.exe in all the other nodes where you want to install the SQL Server clustered instance.
Install the SQL Server failover cluster in the first node:
- Initiate the installation:
- Run Setup.exe as an administrator.
- In the SQL Server Installation Center window, select Installation in the left panel, and then click New SQL Server failover cluster installation.
- In Product key, type the product key, and then click Next.
- In License Terms, select I Accept the license terms, and then click Next.
The installation wizard identifies any issues in the Global Rules window and reports them.
- In Microsoft Update, select Use Microsoft Update to check for updates (recommended), and then click Next.
- Click Next and continue with the installation:
- In Install Failover Cluster Rules, review and resolve any reported errors, and then click Next.
- In Setup Role, select SQL Server Feature Installation, and then click Next.
- In Feature Selection, select Database Engine Services and Management Tools - Basic, and then click Next.
- In Feature Rules, ensure that all the rules have passed, and then click Next.
- In Instance Configuration, type the SQL Server instance network name in SQL Server Network Name, and then click Next.
- In Cluster Resource Group, type the SQL Server cluster resource group name in SQL Server Cluster Resource Group Name, and then click Next.
- In Cluster Disk Selection, select the default cluster disk, and then click Next.
- In Cluster Network Configuration, select the IPv4 network and configure the IP address.
- In Server Configuration:
i On the Service Accounts tab, specify the domain accounts and passwords for the SQL Server agent and SQL Server engine.
ii On the Collation tab, click Customize, and then select SQL_Latin1_General_CP1_CI_AS for the SQL collation.
iii Select Grant Perform Volume Maintenance Task privilege to SQL Server Database Engine Service.
- In the Server Configuration tab of Database Engine Configuration, select Windows authentication mode, and then click Add to enter the SQL server administrators.
- In Database Engine Configuration:
i Click the Data Directories tab.
ii To store the SQL database files, define the paths for disks or paths of the root for the following:
- System databases directory
- User databases
- Log files
- Backup files
- tempdb
- Click Next.
- In Feature Configuration, click Next.
- In Ready to Install, review all the displayed configurations, and then click Install.
The wizard displays the installation progress.
- In the Complete window, verify that all the items have been successfully installed, and then click Close.
- Add the other nodes to the SQL Server failover clustered instance.
Install the SQL Server failover cluster in the second node:
- Initiate the installation:
- Run Setup.exe as an administrator.
- In the SQL Server Installation Center window, select Installation in the left panel, and then click Add node to a SQL Server failover cluster.
- In Product key, verify the product key, and then click Next.
- In License Terms, select I Accept the license terms, and then click Next.
The installation wizard identifies any issues in the Global Rules window and reports them.
- In Microsoft Update, select Use Microsoft Update to check for updates (recommended), and then click Next.
- Continue with the installation:
- In Node Rules, review and resolve any reported errors, and then click Next.
- In Cluster Nodes Configuration, select the SQL Server instance that you want to add to the node.
- In Cluster Network Configuration, select the IPv4 network and configure the IP address.
- In Service Accounts, type and confirm the SQL Server agent and SQL Server engine passwords.
- In Feature Rules, review all the displayed rules, and then click Next.
- In Ready to Add Node, confirm the settings, and then click Install.
The wizard displays the installation progress and prompts you with the completed window after the installation is over.
- Click Close to exit the installation wizard.
The SQL Server failover cluster installation is now complete.
To get the best database performance, perform these steps:
- Open SQL Server Management Studio and click New Query.
- Set the maximum memory by typing the following SQL query:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'max server memory', <'Memory in MB'>;
GO
RECONFIGURE;
GO
- Set MAXDOP to 0 by typing the following SQL query:
USE Master:
GO
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
EXEC sp_configure 'max degree of parallelism', 0;
GO
RECONFIGURE WITH OVERRIDE;
GO
- Move the tempdb to a different volume to isolate the tempdb I/O operations from other databases:
- Open SQL Server Management Studio, and click New Query.
- Type the following SQL query to move the tempdb files:
USE master;
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp, FILENAME = 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp2, FILENAME = 'E:\SQLData\tempdb_mssql_2.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp3, FILENAME = 'E:\SQLData\tempdb_mssql_3.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp4, FILENAME = 'E:\SQLData\tempdb_mssql_4.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp5, FILENAME = 'E:\SQLData\tempdb_mssql_5.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp6, FILENAME = 'E:\SQLData\tempdb_mssql_6.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp7, FILENAME = 'E:\SQLData\tempdb_mssql_7.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = temp8, FILENAME = 'E:\SQLData\tempdb_mssql_8.ndf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLLog\templog.ldf');
GO
- Restart the SQL Server service.