Contents xv
Chapter 11 SQL Server XML Support 479
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .480
Working with XML Data
480
Understanding XML Indexing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .480
HTTP Endpoints
484
Http Endpoints Defined
484
Endpoint Can Interface to a Stored Procedure
. . . . . . . . . . . . . . . .485
How to Create the Endpoint
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485
Web Services
496
XQuery Explained
497
Xpath
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504
Summary of Exam Objectives
509
Exam Objectives Fast Track
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509
Exam Objectives Frequently Asked Questions
511
Self Test
512
Self Test Quick Answer Key
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517
Chapter 12 Service Broker
519
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520
The Queuing Concept Explained
520
Service Broker Defined
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521
Message Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525
Contracts
527
Queues
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .529
Services
533
Endpoints
535
Routes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
Sending a Message
540
Summary of Exam Objectives
544
Exam Objectives Fast Track
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
Exam Objectives Frequently Asked Questions
547
Self Test
548
Self Test Quick Answer Key
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
Chapter 13 Performance Tuning
559
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560
Tracing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .561
Trace Templates
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562
Trace Events
565
Trace Filters
566
Server-Side Tracing
567
xvi Contents
Combining System Monitor and Profiler Traces 568
Replaying Traces
569
Using SQLDiag to Collect Performance Data
. . . . . . . . . . . . . . . . . . .570
Locks, Blocking, and Deadlocks
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .571
Locking
572
Blocking
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .572
Deadlocks
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .573
Transaction Isolation Levels
573
Lock Escalation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .574
Lock Compatibility
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .574
Detecting and Resolving Locking Problems
575
Guide to the DYNAMIC Management Views (DMVs)
. . . . . . . . . . . . . . .578
Partitioning
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .581
Horizontal Partitioning
581
Vertical Partitioning
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
Filegroups
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
Selecting a Partition Key and Number of Partitions
583
Partition Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .584
Partition Scheme
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .584
Moving Data between Partitions
585
Performance Data Collection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .586
Performance Data Collection Explained
. . . . . . . . . . . . . . . . . . . . . . .586
Management Data Warehouse
587
Configuring MDW
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
Configuring Data Collection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .593
Data Collection Caching
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .594
Management Data Warehouse Reports
. . . . . . . . . . . . . . . . . . . . . . . .595
Resource Governor
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .596
Resource Governor Concepts
597
Resource Pools
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .597
Workload Groups
599
Classification Function
599
Validate Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600
Resource Governor Summary
600
Summary of Exam Objectives
601
Exam Objectives Fast Track
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .601
Exam Objectives Frequently Asked Questions
603
Self Test
604
Self Test Quick Answer Key
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
Contents xvii
Chapter 14 Implementing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .612
Understanding DDL and DML Language Elements
613
Working with Tables and Views
619
Creating Tables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .619
Creating User-Defined Data Types
. . . . . . . . . . . . . . . . . . . . . . . . .621
Working with Constraints
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .623
Creating Indexes
625
Working with Full-Text Indexes
630
Viewing and Modifying Data 634
Creating Views
634
Creating Stored Procedures
637
Creating Functions
640
Creating Triggers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .641
Summary of Exam Objectives
646
Exam Objectives Fast Track
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .646
Exam Objectives Frequently Asked Questions
648
Self Test
650
Self Test Quick Answer Key
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .658
Index
659
Companion Web Site: A more detailed answer key for the Self Test questions
in this book is available on the Web.
Go to www.elsevierdirect.com/companions/9781597494205.
This page intentionally left blank
1
Exam objectives review:
˛ Summary of Exam Objectives
˛ Exam Objectives Fast Track
˛ Exam Objectives Frequently Asked Questions
˛ Self Test
˛ Self Test Quick Answer Key
Exam objectives in this chapter:
New Feature Overview
Reporting Services
New Features in
SQL Server 2008
Chapter 1
MCTS SQL Server 2008
Exam 432