About the Contributors |
|
v | |
Preface |
|
xvii | |
Acknowledgments |
|
xxi | |
Introduction |
|
xxiii | |
|
Installing SQL Server 2005 |
|
|
1 | (48) |
|
|
2 | (13) |
|
|
2 | (6) |
|
|
8 | (3) |
|
Operating System Requirements |
|
|
11 | (1) |
|
Database-Imposed Requirements |
|
|
12 | (3) |
|
|
15 | (13) |
|
Default and Named Instances |
|
|
15 | (3) |
|
Installing a Default Instance |
|
|
18 | (7) |
|
Exercise 1-1: Installing a Default Instance of SQL Server 2005 |
|
|
25 | (3) |
|
Installing a Named Instance |
|
|
28 | (1) |
|
Upgrade from an Earlier Version of SQL Server |
|
|
28 | (10) |
|
Upgrading from SQL Server 6.5 |
|
|
29 | (1) |
|
Upgrading from SQL Server 7.0 or 2000 |
|
|
30 | (1) |
|
|
30 | (6) |
|
|
36 | (2) |
|
|
38 | (11) |
|
|
43 | (1) |
|
|
44 | (3) |
|
|
47 | (2) |
|
Configuring SQL Server 2005 |
|
|
49 | (56) |
|
Configure SQL Server 2005 Instances and Databases |
|
|
50 | (33) |
|
Using SQL Server Configuration Manager |
|
|
51 | (10) |
|
Exercise 2-1: Creating an Alias |
|
|
61 | (1) |
|
|
62 | (4) |
|
Configuring Server Properties with SSMS |
|
|
66 | (8) |
|
Using the sqlcmd Command Line Utility |
|
|
74 | (2) |
|
Working with the System and Sample Databases |
|
|
76 | (2) |
|
Exercise 2-2: Installing the Sample Databases |
|
|
78 | (4) |
|
Adding and Removing Components and Features |
|
|
82 | (1) |
|
Configure the SQL Server Database Mail Subsystem for an Instance |
|
|
83 | (6) |
|
|
83 | (1) |
|
Configuring Database Mail |
|
|
84 | (1) |
|
Exercise 2-3: Configuring the MSDB Database as a Mailhost |
|
|
85 | (1) |
|
Exercise 2-4: Configuring SQL Server Agent to Use the Mail Profile |
|
|
86 | (1) |
|
Exercise 2-5: Creating Operators That Use Database Mail |
|
|
87 | (2) |
|
Implement an HTTP Endpoint |
|
|
89 | (7) |
|
Creating an HTTP Endpoint |
|
|
90 | (2) |
|
Securing an HTTP Endpoint |
|
|
92 | (2) |
|
|
94 | (2) |
|
|
96 | (9) |
|
|
100 | (1) |
|
|
101 | (2) |
|
|
103 | (2) |
|
Creating Databases and Database Objects |
|
|
105 | (44) |
|
Configure Log Files and Data Files |
|
|
106 | (7) |
|
|
106 | (6) |
|
Exercise 3-1: Creating a Database in SSMS |
|
|
112 | (1) |
|
|
113 | (10) |
|
Understanding Tables and Data Types |
|
|
114 | (6) |
|
Creating Tables in SSMS and T-SQL |
|
|
120 | (2) |
|
Exercise 3-2: Creating Tables in T-SQL |
|
|
122 | (1) |
|
|
123 | (7) |
|
Understanding and Implementing Indexes |
|
|
123 | (7) |
|
Implement a Full-Text Search |
|
|
130 | (9) |
|
Understanding and Implementing Full-Text Search |
|
|
130 | (7) |
|
|
137 | (2) |
|
|
139 | (10) |
|
|
144 | (1) |
|
|
145 | (2) |
|
|
147 | (2) |
|
|
149 | (42) |
|
SQL Server Security Overview |
|
|
150 | (2) |
|
Configure Server Security Principals |
|
|
152 | (13) |
|
Creating and Managing Principals and Roles |
|
|
152 | (3) |
|
Exercise 4-1: Creating a SQL Login |
|
|
155 | (3) |
|
Exercise 4-2: Creating Windows Logins |
|
|
158 | (7) |
|
Configure Database Securables |
|
|
165 | (10) |
|
Managing Permissions to Database Securables |
|
|
166 | (4) |
|
Exercise 4-3: Permission Management in SQL Server Management Studio |
|
|
170 | (5) |
|
|
175 | (7) |
|
Understanding Encryption in SQL Server 2005 |
|
|
175 | (1) |
|
Implementing Encryption in SQL Server 2005 |
|
|
176 | (1) |
|
Exercise 4-4: Encrypting Data in a Database |
|
|
177 | (3) |
|
|
180 | (2) |
|
|
182 | (9) |
|
|
186 | (1) |
|
|
187 | (1) |
|
|
188 | (3) |
|
Creating Views, Partitions, and Linked Servers |
|
|
191 | (34) |
|
|
192 | (13) |
|
|
193 | (2) |
|
|
195 | (2) |
|
|
197 | (2) |
|
Creating an Updatable View |
|
|
199 | (1) |
|
Assigning Permissions for a View |
|
|
200 | (1) |
|
Exercise 5-1: Creating Views in SSMS and with T-SQL |
|
|
200 | (4) |
|
|
204 | (1) |
|
|
205 | (6) |
|
|
207 | (1) |
|
Creating Partition Schemes and Partitioned Tables and Indexes |
|
|
208 | (3) |
|
|
211 | (8) |
|
Determining the External Data Source |
|
|
212 | (1) |
|
Identifying the Characteristics of the Data Source |
|
|
212 | (1) |
|
Identifying the Security Model of the Data Source |
|
|
213 | (1) |
|
|
214 | (3) |
|
|
217 | (2) |
|
|
219 | (6) |
|
|
222 | (1) |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
225 | (78) |
|
|
226 | (4) |
|
|
230 | (1) |
|
|
231 | (10) |
|
Retrieve Data to Support Ad Hoc and Recurring Queries |
|
|
241 | (22) |
|
|
241 | (22) |
|
Manipulate Relational Data |
|
|
263 | (10) |
|
Creating, Updating, and Deleting Data |
|
|
263 | (6) |
|
Managing Transactions and Handling Errors |
|
|
269 | (4) |
|
Manage Databases by Using Transact-SQL |
|
|
273 | (20) |
|
Managing Database Objects |
|
|
273 | (7) |
|
New T-SQL Features in SQL Server 2005 |
|
|
280 | (11) |
|
|
291 | (2) |
|
|
293 | (10) |
|
|
298 | (1) |
|
|
299 | (2) |
|
|
301 | (2) |
|
Working with Constraints, Triggers, and Stored Procedures |
|
|
303 | (34) |
|
|
304 | (8) |
|
|
304 | (2) |
|
|
306 | (3) |
|
|
309 | (3) |
|
|
312 | (6) |
|
|
312 | (4) |
|
|
316 | (1) |
|
|
317 | (1) |
|
|
318 | (1) |
|
Create User-Defined Types |
|
|
318 | (5) |
|
|
319 | (1) |
|
Creating T-SQL (Alias) User-Defined Types |
|
|
319 | (2) |
|
Creating CLR User-Defined Types |
|
|
321 | (2) |
|
Implement Stored Procedures |
|
|
323 | (2) |
|
Store Procedures Unveiled |
|
|
323 | (1) |
|
Creating a Stored Procedure |
|
|
324 | (1) |
|
Securing Stored Procedures |
|
|
325 | (1) |
|
|
325 | (6) |
|
|
325 | (1) |
|
|
326 | (3) |
|
|
329 | (2) |
|
|
331 | (6) |
|
|
334 | (1) |
|
|
335 | (1) |
|
|
336 | (1) |
|
Backup and Restore of SQL Server with SQL Agent Jobs |
|
|
337 | (40) |
|
|
338 | (13) |
|
|
338 | (2) |
|
Choosing a Recovery Model |
|
|
340 | (2) |
|
Using the Different Backup Types |
|
|
342 | (3) |
|
Exercise 8-1: Performing a Full Backup |
|
|
345 | (2) |
|
Working with Backup Devices and Files |
|
|
347 | (3) |
|
Performing Filegroup Backups |
|
|
350 | (1) |
|
Backing Up System Databases |
|
|
350 | (1) |
|
|
351 | (3) |
|
Choosing a Restore Method |
|
|
351 | (1) |
|
Restoring to a Point in Time |
|
|
352 | (1) |
|
Restoring to the Point of Failure |
|
|
353 | (1) |
|
Restoring System Databases |
|
|
353 | (1) |
|
Implement and Maintain SQL Server Agent Jobs |
|
|
354 | (12) |
|
|
354 | (1) |
|
|
355 | (1) |
|
Exercise 8-2: Creating an Operator |
|
|
355 | (1) |
|
|
356 | (4) |
|
Maintaining and Managing Jobs |
|
|
360 | (1) |
|
Database Maintenance Plans |
|
|
360 | (2) |
|
Exercise 8-3: Creating a Database Maintenance Plan |
|
|
362 | (3) |
|
|
365 | (1) |
|
Move a Database Between Servers |
|
|
366 | (5) |
|
|
366 | (3) |
|
|
369 | (2) |
|
|
371 | (6) |
|
|
374 | (1) |
|
|
375 | (1) |
|
|
376 | (1) |
|
Data Redundancy and Availability |
|
|
377 | (44) |
|
|
378 | (3) |
|
Implement Database Mirroring |
|
|
381 | (7) |
|
Database Mirroring Components |
|
|
381 | (2) |
|
Understanding Operating Modes |
|
|
383 | (1) |
|
Planning for Role Switching |
|
|
384 | (1) |
|
Implementing Database Mirroring |
|
|
385 | (3) |
|
|
388 | (5) |
|
Inside the Log Shipping Process |
|
|
389 | (2) |
|
Configuring Log Shipping and Monitoring |
|
|
391 | (2) |
|
Manage Database Snapshots |
|
|
393 | (3) |
|
Database Snapshot Functionality |
|
|
393 | (1) |
|
|
394 | (1) |
|
|
395 | (1) |
|
|
395 | (1) |
|
|
396 | (7) |
|
Replication Roles and Concepts |
|
|
396 | (1) |
|
|
396 | (3) |
|
|
399 | (1) |
|
Configuring a Publisher and Distributor |
|
|
399 | (3) |
|
|
402 | (1) |
|
|
402 | (1) |
|
|
402 | (1) |
|
|
403 | (1) |
|
Import and Export Data from a File |
|
|
403 | (12) |
|
|
404 | (2) |
|
|
406 | (1) |
|
|
407 | (1) |
|
Using Integration Services |
|
|
407 | (6) |
|
|
413 | (2) |
|
|
415 | (6) |
|
|
418 | (1) |
|
|
419 | (1) |
|
|
420 | (1) |
|
|
421 | (22) |
|
Implement Service Broker Components |
|
|
422 | (15) |
|
Understanding Service Broker |
|
|
423 | (5) |
|
Creating Service Broker Objects |
|
|
428 | (4) |
|
|
432 | (1) |
|
Exercise 10-1: Implementing a Service Broker Solution |
|
|
432 | (4) |
|
|
436 | (1) |
|
|
437 | (6) |
|
|
439 | (1) |
|
|
440 | (1) |
|
|
441 | (2) |
|
|
443 | (26) |
|
|
444 | (3) |
|
XML in SQL Server: An Overview |
|
|
447 | (1) |
|
|
447 | (19) |
|
|
447 | (3) |
|
|
450 | (1) |
|
|
451 | (6) |
|
|
457 | (2) |
|
|
459 | (1) |
|
Using Schemas to Meet Consumers' Structure Needs |
|
|
460 | (5) |
|
|
465 | (1) |
|
|
466 | (3) |
|
|
467 | (1) |
|
|
468 | (1) |
|
|
468 | (1) |
|
SQL Server Performance Monitoring and Tuning |
|
|
469 | (36) |
|
Some Introductory Thoughts |
|
|
470 | (2) |
|
Windows Server Performance Tools |
|
|
472 | (1) |
|
|
472 | (3) |
|
|
475 | (9) |
|
Adding the System Monitor as a Snap-In |
|
|
475 | (1) |
|
Exercise 12-1: Correlating Performance Logs with SQL Profile Traces |
|
|
475 | (1) |
|
Using the Performance Console |
|
|
476 | (1) |
|
|
476 | (2) |
|
|
478 | (3) |
|
|
481 | (1) |
|
|
481 | (1) |
|
SQL Server Performance Tools |
|
|
482 | (2) |
|
Gather Performance and Optimization Data by Using SQL Profiler |
|
|
484 | (7) |
|
Create and Save a New Trace |
|
|
484 | (2) |
|
Exercise 12-2: Creating and Saving a SQL Profiler Trace |
|
|
486 | (1) |
|
|
487 | (1) |
|
Correlate Trace Data with Performance Logs |
|
|
488 | (1) |
|
Exercise 12-3: Correlating Performance Logs with SQL Profile Traces |
|
|
488 | (3) |
|
Gather Performance and Optimization Data by Using the Database Engine Tuning Advisor |
|
|
491 | (5) |
|
Building a Workload File with Profiler |
|
|
492 | (1) |
|
|
492 | (3) |
|
Saving the Recommended Indexes |
|
|
495 | (1) |
|
Gather Performance and Optimization Data by Using DMVs |
|
|
496 | (4) |
|
|
498 | (2) |
|
|
500 | (5) |
|
|
502 | (1) |
|
|
503 | (1) |
|
|
504 | (1) |
|
Troubleshooting Server and Database Errors |
|
|
505 | (30) |
|
REACT: A Troubleshooting Methodology |
|
|
506 | (3) |
|
Monitor and Resolve Blocks and Deadlocks |
|
|
509 | (7) |
|
Understanding Concurrency |
|
|
509 | (1) |
|
|
509 | (2) |
|
|
511 | (3) |
|
Exercise 13-1: Forcing a Deadlock Situation |
|
|
514 | (2) |
|
|
516 | (1) |
|
Diagnose and Resolve Database Server Errors |
|
|
516 | (8) |
|
Using the Dedicated Administrator Connection |
|
|
516 | (3) |
|
Reading the SQL Server Error Logs |
|
|
519 | (1) |
|
|
520 | (4) |
|
Monitor SQL Server Agent Job History |
|
|
524 | (6) |
|
Finding and Resolving Job Errors |
|
|
524 | (5) |
|
|
529 | (1) |
|
|
530 | (5) |
|
|
532 | (1) |
|
|
533 | (1) |
|
|
534 | (1) |
|
|
535 | (4) |
|
|
536 | (1) |
|
|
536 | (1) |
|
Installing and Running MasterExam and MasterSim |
|
|
536 | (1) |
|
|
537 | (1) |
|
|
537 | (1) |
|
|
537 | (1) |
|
|
537 | (1) |
|
|
538 | (1) |
|
|
538 | (1) |
|
|
538 | (1) |
|
LearnKey Technical Support |
|
|
538 | (1) |
|
|
539 | (14) |
|
|
540 | (1) |
|
|
541 | (1) |
|
Supported Operating Systems |
|
|
541 | (1) |
|
|
541 | (1) |
|
|
542 | (2) |
|
Full-Text, Clustered, and Non-Clustered Indexes |
|
|
544 | (1) |
|
Fixed Server and Database Roles |
|
|
545 | (1) |
|
Securables and Scope Levels |
|
|
546 | (1) |
|
|
547 | (1) |
|
|
548 | (1) |
|
|
549 | (1) |
|
|
549 | (1) |
|
Performance Optimization and Troubleshooting |
|
|
550 | (3) |
|
C. SQL Server 2005 Implementation Case Studies |
|
|
553 | (14) |
|
Case Study #1: School Student Tracking Database |
|
|
554 | (5) |
|
Case Study #2: Online Store |
|
|
559 | (3) |
|
Case Study #3: Existing SQL Server 2005 System |
|
|
562 | (5) |
Glossary |
|
567 | (14) |
Index |
|
581 | |