Book Image

Getting Started with SQL Server 2014 Administration

By : Gethyn Ellis
Book Image

Getting Started with SQL Server 2014 Administration

By: Gethyn Ellis

Overview of this book

Table of Contents (13 chapters)
Getting Started with SQL Server 2014 Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Partition switching and indexing


With SQL Server 2014, it is possible for individual partitions of partitioned tables to be rebuilt.

In the following code example, we will rebuild a single partition, that is, partition number 5 of the IX_GETEST partitioned index on the dbo.t1 table:

ALTER INDEX IX_GETEST
ON dbo.t1
REBUILD Partition = 5

The ONLINE = ON option can also be used and now contains a further switch WAIT_AT_LOW_PRIORITY option that will allow you as a DBA to specify how long the rebuild process should wait for the necessary locks. The WAIT_AT_LOW_PRIORITY option will also allow the DBA to configure the termination of blocking processes related to the rebuild statement. This can be used in combination with the REBUILD Partition option.