Você está na página 1de 10

Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 1 of 10

Lab Answer Key: Module 10: Clustering with Windows


Server and SQL Server 2014

Lab: Implementing an AlwaysOn Failover Cluster


Instance

Exercise 1: Inspect the Windows Server Failover Cluster


Configuration

Task 1: Prepare the Lab Environment

1. Ensure that only the 20465C-MIA-DC, 20465C-MIA-FCI-CLUST1, 20465C-MIA-FCI-


CLUST2, and 20465C-MIA-FCI-CLUST3 virtual machines are running, and log on to
20465C-MIA-FCI-CLUST1 as ADVENTUREWORKS\Student with the password
Pa$$w0rd.

2. In the D:\Labfiles\Lab10\Starter folder, right-click Setup.cmd, and then click Run as


administrator.

3. In the User Account Control dialog box, click Yes, and wait for the script to finish.

4. In the D:\Labfiles\Lab10\Starter folder, right-click Setup2.cmd, and then click Run as


administrator.

5. In the User Account Control dialog box, click Yes, and wait for the script to finish.

Task 2: View the Windows Server Failover Cluster configuration in Failover


Cluster Manager

1. On the Start screen, type Failover, and then start Failover Cluster Manager.

2. Click MIA-CLUSTER.adventureworks.msft, and then review the information about


the Windows Server Failover Cluster, noting the following points:

o The cluster includes three nodes.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 2 of 10

o The cluster has no clustered roles.

o The quorum configuration is Node Majority.

3. Expand MIA-CLUSTER.adventureworks.msft, and then click Nodes.

4. In the Nodes pane, in the Status column, note that the status of each of the three cluster
nodes is Up.

5. Expand Storage, and then click Disks. In the Disks pane, in the Status column, note that
the status of Cluster Disk 1 is Online.

6. Right-click Cluster Disk 1, and then click Properties.

7. In the Cluster Disk 1 Properties dialog box, on the General tab, review the information
about the cluster disk.

8. Click the Policies tab, and review the failure responses for the disk resource.

9. Click the Advanced Policies tab, and review the possible owners for the disk resource.

10. In the Cluster Disk 1 Properties dialog box, click Cancel.

11. Click Networks, and then in the Networks pane, in the Status column, note that the
status of the Cluster Network 1 resource is Up.

Task 3: Run the Cluster Validation Wizard

1. Click MIA-CLUSTER.adventureworks.msft, and then click Validate Cluster.

2. In the Validate a Configuration Wizard, on the Before you Begin page, click Next.

3. On the Testing Options page, click Run all tests (recommended), and then click Next.

4. On the Review Storage Status page, select the Cluster Disk 1 check box, and then click
Next.

5. On the Confirmation page, click Next,

6. Wait for the validation to complete, and then click View Report.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 3 of 10

7. In the Failover Cluster Validation Report, in the Cluster Configuration section, click
Validate Quorum Configuration, review the information, and then click Back to
Failover Cluster Validation Report.

8. In the Network section, click Validate Network Communication, review the


information, and then click Back to Failover Cluster Validation Report.

9. Close the Failover Cluster Validation Report, and then in the Validate a
Configuration Wizard, click Finish.

10. Minimize Failover Cluster Manager.

Results: After completing this exercise, you will have:


Inspected the WSFC configuration.
Run the Cluster Validation Wizard.

Exercise 2: Install an AlwaysOn Failover Cluster Instance

Task 1: Install a SQL Server 2014 AlwaysOn Failover Cluster Instance

1. In the C:\SQLServer2014-x64-ENU folder, double-click Setup.exe, and then in the User


Account Control dialog box, click Yes.

2. Wait a few moments for the SQL Server Installation Center to start, click Installation,
and then click New SQL Server failover cluster installation.

3. Wait a few moments for the Install a SQL Server Failover Cluster wizard to start. On
the Global Rules page, wait for the rule check to complete. Then on the Microsoft
Updates and Product Updates pages, clear any checkboxes and click Next.

4. After the Install Setup Files page completes, on the Install Failover Cluster Rules
page, wait for the rules check to complete, review the results, and then click Next.

5. On the Product Key page, click Next, on the License Terms page click the I accept the
license terms check box, clear the option to turn on Customer Experience Improvement
Program (CEIP) and Error Reporting, and then click Next.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 4 of 10

6. On the Setup Role page, click the SQL Server Feature Installation radio button, and
then click Next.

7. On the Feature Selection page, click the Database Engine Services check box, and
then click Next.

8. On the Instance Configuration page, in the SQL Server Network Name field, type
SQLCLUSTER, click Named instance, in the Named instance field, type SQL1, and
then click Next.

9. On the Cluster Resource Group page, review the information, and then click Next.

10. On the Cluster Disk Selection page, ensure that the Cluster Disk 1 check box is
selected, and then click Next.

11. On the Cluster Network Configuration page, click the IP Type check box, in the
Address column, type 10.10.0.160, and then click Next.

12. On the Server Configuration page, in the SQL Server Agent row, in the Account
Name column, type ADVENTUREWORKS\ServiceAcct, in the Password column,
type Pa$$w0rd, in the SQL Server Database Engine row, in the Account Name
column, type ADVENTUREWORKS\ServiceAcct, in the Password column, type
Pa$$w0rd, and then click Next.

13. On the Database Engine Configuration page, on the Server Configuration tab, click
Add Current User, and then click Next.

14. On the Ready to Install page, click Install. Wait for the installation to complete, on the
Complete page, click Close, and then close the SQL Server Installation Center.

15. Close File Explorer.

Task 2: Add Nodes to the SQL Server Failover Cluster Instance

1. Log on to the MIA-CLUST2 virtual machine as ADVENTUREWORKS\Student with


the password Pa$$w0rd.

2. In the C:\SQLServer2014-x64-ENU folder, double-click Setup.exe, and then in the User


Account Control dialog box, click Yes.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 5 of 10

3. In SQL Server Installation Center, click Installation, and then click Add node to a SQL
Server failover cluster.

4. On the Global Rules page, wait for the rule check to complete. Then on the Microsoft
Updates and Product Updates pages, clear any checkboxes and click Next.

5. After the Install Setup Files page completes, on the Add Node Rules page, wait for the
rules check to complete, review the results, and then click Next.

6. On the Product Key page, click Next, on the License Terms page click the I accept the
license terms check box, clear the Turn on Customer Experience Improvement
Program and Error Reporting check box, and then click Next.

7. On the Cluster Node Configuration page, click Next, and then on the Cluster
Network Configuration page, click Next.

8. On the Service Accounts page, in the SQL Server Agent row, in the Password column,
type Pa$$w0rd, in the SQL Server Database Engine row, in the Password column,
type Pa$$w0rd, and then click Next.

9. On the Ready to Add Node page, click Install. Wait for the installation to complete, on
the Complete page, click Close, close the SQL Server Installation Center, and then close
File Explorer.

10. Log on to the MIA-CLUST3 virtual machine as ADVENTUREWORKS\Student with


the password Pa$$w0rd.

11. Repeat steps 2 to 9 to add MIA-CLUST3 as a node in the failover cluster instance.

Task 3: Review the Failover Cluster Instance Configuration

1. On the MIA-CLUST1 virtual machine, start Failover Cluster Manager.

2. Expand MIA-CLUSTER.adventureworks.msft, and then click Roles.

3. In the Roles, pane, click SQL Server (SQL1), and then review the information in the
Status and Owner Node columns.

4.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 6 of 10

If the value in the Owner Node column is not MIA-CLUST1, in the Actions pane, under
SQL Server (SQL1), click Move, click Select Node, in the Move Clustered Role
dialog box, click MIA-CLUST1, click OK, and then wait for the role to finish moving
to the MIA-CLUST1 node.

5. In the Actions pane, click Properties. In the SQL Server (SQL1) Properties dialog
box, on the General tab, in the Preferred Owners section, note that MIA-CLUST1,
MIA-CLUST2, and MIA-CLUST3 are all possible owners of the resource.

6. Click the Failover tab, review the failover settings, and then click Cancel.

7. In Failover Cluster Manager, at the bottom of the SQL Server (SQL1) pane, click the
Resources tab, and then review the information about the resources associated with SQL
Server (SQL1).

8. Minimize Failover Cluster Manager, on the taskbar, click SQL Server Management
Studio.

9. In the Connect to Server dialog box, in the Server Name field, type
SQLCLUSTER\SQL1, and then click Connect.

10. In Object Explorer, right-click SQLCLUSTER\SQL1, click Properties, and then in the
Server Properties SQLCLUSTER\SQL1 dialog box, on the General tab, in the
IsClustered row, note that the value is True.

11. Click Cancel, and then minimize SQL Server Management Studio.

Results: After completing this exercise, you will have:


Installed an AlwaysOn FCI.
Added nodes to the FCI.
Reviewed the FCI configuration.

Exercise 3: Configure tempdb to Use Local Storage

Task 1: Change the Storage Location for tempdb

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 7 of 10

1. In the C:\ folder, create a new folder named tempdb.

2. Start SQL Server Management Studio, and then click New Query.

3. In the SQLQuery1.sql window, type the following Transact-SQL statements, and then
click Execute:

ALTER DATABASE tempdb MODIFY FILE


(NAME=tempdev, FILENAME='C:\tempdb\tempdb.mdf');
GO
ALTER DATABASE tempdb MODIFY FILE
(NAME=templog, FILENAME='C:\tempdb\templog.ldf');
GO

4. In the Results pane, review the messages and note that the folder must exist on every
node in the cluster, as well as the permissions requirements.

5. Close the SQLQuery1.sql window, and do not save any changes. Minimize SQL Server
Management Studio.

6. On the MIA-CLUST2 and MIA-CLUST3 virtual machines, repeat step 1.

Task 2: Review tempdb Configuration

1. On the MIA-CLUST2 virtual machine, on the taskbar, click File Explorer, browse to
C:\tempdb, and note that the folder is empty. This is because the service must restart for
SQL Server to move the tempdb files.

2. On the MIA-CLUST1 virtual machine, on the taskbar, click Failover Cluster Manager,
under MIA- CLUSTER.adventureworks.msft, click Roles, and then in the Roles (1)
window, click SQL Server (SQL1).

3. In the Actions pane, under SQL Server (SQL1), click Move, click Select Node, in the
Move Clustered Role dialog box, click MIA-CLUST2, and then click OK.

4. Wait for the move to complete, and then minimize Failover Cluster Manager.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 8 of 10

5. On the MIA-CLUST2 virtual machine in File Explorer, in C:\tempdb, note that the
folder now contains the tempdb database files. This is because moving the role to the
MIA-CLUST2 node forced the recreation of the tempdb database on that node.

Results: After completing this exercise, you will have:


Changed the storage location for the tempdb database files.
Reviewed the new tempdb configuration.

Exercise 4: Test Automatic Failover and Failback

Task 1: Trigger and Test automatic Failover

1. On the MIA-CLUST1 virtual machine, in the D:\Labfiles\Lab10\Starter folder, right-


click the CreateTestDatabase.cmd file, and then click Run as administrator.

2. In the User Account Control dialog box, click Yes, wait for the script to finish.

3. Start SQL Server Management Studio, and in Object Explorer, expand Databases,
expand HumanResources, expand Tables, right-click dbo.Employee, and then click
Select Top 1000 Rows.

4. Check that the query returns the rows without any errors.

5. On the host computer, in Hyper-V Manager, right-click 20465C-MIA-FCI-CLUST2,


and click Turn Off. Then if the Turn Off Machine dialog box is displayed, click Turn
Off. This action simulates failure of the node that is the owner of the SQL Server
(SQL1) role.

6. On the MIA-CLUST1 virtual machine, on the taskbar, click Failover Cluster Manager,
click Roles, and then watch the SQL Server (SQL1) role fail over from the MIA-
CLUST2 node to either the MIA-CLUST3 node or the MIA-CLUST1 node.

7. When failover has finished, in the lower part of the window, click the Resources tab,
and review the available resources, checking that they all report a status of Online.

8.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 9 of 10

In SQL Server Management Studio, in the query window, highlight the Transact-SQL
statement that returns the top 1000 rows from the dbo.Employees table, and then click
Execute. If the server reports a transport error, click Execute again.

9. Verify that the query returns the employee data.

Task 2: Configure and Test Automatic Failback

1. On the taskbar, click Failover Cluster Manager, right-click the SQL Server (SQL1)
role, and then click Properties.

2. In the SQL Server (SQL1) Properties dialog box, on the General tab, in the Preferred
Owners box, click the MIA-CLUST2 check box, click the Failover tab, click Allow
Failback radio button, ensure that the Immediately radio button is selected, and then
click OK.

3. On the host computer, in Hyper-V Manager, right-click 20465C-MIA-FCI-CLUST2,


and then click Start.

4. On the MIA-CLUST1 virtual machine, in Failover Cluster Manager, click Roles, and
then wait for the SQL Server (SQL1) role to failback to the MIA-CLUST2 role.

5. Close Failover Cluster Manager, and then close SQL Server Management Studio. Do not
save any changes if prompted to do so.

6. On the host machine, in Hyper-V Manager, right-click 20465C-MIA-FCI-CLUST1,


and then click Shut Down.

7. Repeat step 6 to shut down the following virtual machines:

o 20465C-MIA-FCI-CLUST2

o 20465C-MIA-FCI-CLUST3

Results: After completing this exercise, you will have:


Tested automatic failover.
Configured automatic failback settings and tested failback.

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016
Lab Answer Key: Module 10: Clustering with Windows Server and SQL Server 2014 Page 10 of 10

https://skillpipe.com/en-GB/Book/BookPrintView/9aebb618-0e1c-463c-9c47-d581ec... 08-12-2016

Você também pode gostar