Implement and Maintain Indexes
Implement and Maintain Indexes
Introduction
Managing Indexes
Full Text Indexes
Summary
Introduction
The Implement and Maintain Indexes module provides you with the instruction and
server hardware to develop your hands on skills in the defined topics. This module
includes the following exercises:
Managing Indexes
Full Text Indexes
This lab now includes a SQL 2014 device, this means you can now carry out the
steps in SQL 2012 and SQL 2014. Notes have been included where any differences
in the steps may occur.
Lab Diagram
During your session you will have access to the following lab configuration. Depending
on the exercises you may or may not use all of the devices, but they are shown here in the
layout to get an overall understanding of the topology of the lab.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 1/26
7/23/2019 Print content
In this module you will be working on the following equipment to carry out the steps
defined in each exercise.
To start, simply choose a device and click Power on. In some cases, the devices may
power on automatically.
For further information and technical support, please see our Help and Support
page.
Copyright Notice
This document and its content is copyright of Practice-IT - © Practice-IT 2014. All rights reserved. Any
redistribution or reproduction of part or all of the contents in any form is prohibited other than the
following:
1) You may print or download to a local hard disk extracts for your personal and non-commercial use
only.
2) You may copy the content to individual third parties for their personal use, but only if you
acknowledge the website as the source of the material. You may not, except with our express written
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 2/26
7/23/2019 Print content
permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any
other website or other form of electronic retrieval system.
SQL 2014 Note: To complete the following steps in SQL 2014, you will need to
replace the AdventureWorks2012 database name with AdventureWorks2014
in all the instances in text as well as code.
In this exercise, you will learn the following about Microsoft SQL Server 2012:
Step 1
Ensure you have powered on the required devices and Connect to PLABSQL01.
SQL 2014 Note: To complete the following steps in SQL 2014, connect to
PLABSQL03.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 3/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 4/26
7/23/2019 Print content
Step 1
From SQL Server Management Studio.
In the query window, enter the following query and click Execute.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 5/26
7/23/2019 Print content
Step 1
From SQL Server Management Studio.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 6/26
7/23/2019 Print content
Enter the following query in the new query window and click Execute.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 7/26
7/23/2019 Print content
Implementing Indexes
Step 1
From SQL Server Management Studio.
You can rebuild or reorganize an index. The rebuilding process is meant to be used when
there is heavier fragmentation. Reorganize, on the other hand, is used for light or
moderate level of fragmentation.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 8/26
7/23/2019 Print content
Note: You will first run the reorganize process and then run the rebuild process.
Step 1
From SQL Server Management Studio.
The dialog box automatically closes after the reorganizing process is complete.
Step 1
From SQL Server Management Studio.
Enter PLAB.Person in the Index name text box by overwriting the existing name.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 10/26
7/23/2019 Print content
Click Add.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 11/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 12/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 13/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 14/26
7/23/2019 Print content
Leave the devices you have powered on in their current state and proceed to the next
exercise.
To get a better understanding of this technology, please refer to your course material or
use your preferred search engine to research this topic in more detail.
In this exercise, you will learn the following about Microsoft SQL Server 2012:
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 15/26
7/23/2019 Print content
Step 1
Ensure you have powered on the required devices and Connect to PLABSQL01.
SQL 2014 Note: To complete the following steps in SQL 2014, connect to
PLABSQL03.
The Full-Text Indexing Wizard is displayed. On the Welcome to the SQL Server
Full-Text Indexing Wizard, click Next.
On the Select an Index screen, keep the default values and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 17/26
7/23/2019 Print content
On the Select Table Columns screen, select Name under the Available Columns
column and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 18/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 19/26
7/23/2019 Print content
On the Select Catalog, Index FileGroup, and Stoplist screen, select Create a new
catalog and enter PLAB as the name in the Name textbox. Click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 20/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 21/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 22/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 23/26
7/23/2019 Print content
Step 2
Right-click HumanResources.Shift, select Full-Text index, and then select Start
Full Population.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 24/26
7/23/2019 Print content
Shutdown all virtual machines used in this lab, by using the power functions located in
the Tools bar before proceeding to the next module. Alternatively you can log out of the
lab platform.
Summary
In this exercise, you learnt the following about Microsoft SQL Server 2012:
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 25/26
7/23/2019 Print content
Also try
Using the current lab setup, you can perform the following tasks at your own pace.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 26/26