Acknowledgements |
|
xix | |
Introduction |
|
xxiii | |
Who This Book Is For |
|
xxiv | |
How This Books is Organized |
|
xxv | |
System Requirements |
|
xxvi | |
Using the Samples |
|
xxvii | |
Support for This Book |
|
xxix | |
Questions and Comments |
|
xxix | |
|
Part I Design Fundamentals and Core Technologies |
|
|
|
|
3 | (8) |
|
|
3 | (1) |
|
The Software Industry and Disruptive Change |
|
|
3 | (1) |
|
Industry Trends, SQL Server Features, and a Book to Show You the Way |
|
|
4 | (5) |
|
|
4 | (1) |
|
Application Code and SQL Server: Extending Your Database's Reach |
|
|
5 | (2) |
|
It's the Strategy, Stupid |
|
|
7 | (2) |
|
A Collaborative Effort for, and by, Developers |
|
|
9 | (2) |
|
Exploring the T-SQL Enhancements in SQL Server 2005 |
|
|
11 | (34) |
|
Introducing SQL Server Management Studio |
|
|
12 | (1) |
|
|
13 | (7) |
|
Recursive Queries with CTEs |
|
|
16 | (4) |
|
The Pivot and Unpivot Operators |
|
|
20 | (5) |
|
|
21 | (1) |
|
Dynamically Pivoting Columns |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (12) |
|
|
26 | (4) |
|
|
30 | (2) |
|
Dense_Rank() and Ntile(n) |
|
|
32 | (2) |
|
Using All the Ranking Functions Together |
|
|
34 | (1) |
|
Ranking over Groups: Partition By |
|
|
35 | (3) |
|
Exception Handling in Transactions |
|
|
38 | (2) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
DDL Triggers and Notifications |
|
|
42 | (1) |
|
|
43 | (1) |
|
Statement-Level Recompile |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
45 | (48) |
|
Getting Started: Enabling CLR Integration |
|
|
46 | (2) |
|
Visual Studio/SQL Server Integration |
|
|
48 | (5) |
|
SQL Server Projects in Visual Studio |
|
|
49 | (2) |
|
|
51 | (1) |
|
|
52 | (1) |
|
Your First SQL CLR Stored Procedure |
|
|
53 | (2) |
|
CLR Stored Procedures and Server-Side Data Access |
|
|
55 | (4) |
|
Piping Data with SqlDataRecord and SqlMetaData |
|
|
57 | (2) |
|
|
59 | (6) |
|
|
59 | (2) |
|
Deploying Your Stored Procedures |
|
|
61 | (2) |
|
Testing Your Stored Procedures |
|
|
63 | (2) |
|
|
65 | (4) |
|
|
69 | (5) |
|
|
74 | (4) |
|
|
78 | (6) |
|
|
84 | (1) |
|
Examining and Managing CLR Types in a Database |
|
|
85 | (6) |
|
Best Practices for SQL CLR Usage |
|
|
91 | (1) |
|
|
92 | (1) |
|
XML and the Relational Database |
|
|
93 | (46) |
|
|
95 | (1) |
|
|
96 | (9) |
|
Working with the XML Data Type as a Variable |
|
|
96 | (2) |
|
Working with XML in Tables |
|
|
98 | (1) |
|
|
99 | (3) |
|
|
102 | (3) |
|
|
105 | (17) |
|
|
106 | (1) |
|
|
106 | (2) |
|
|
108 | (12) |
|
OPENXML Enhancements in SQL Server 2005 |
|
|
120 | (1) |
|
|
121 | (1) |
|
Querying XML Data Using XQuery |
|
|
122 | (15) |
|
|
122 | (3) |
|
SQL Server 2005 XQuery in Action |
|
|
125 | (9) |
|
|
134 | (1) |
|
Converting a Column to XML |
|
|
135 | (2) |
|
|
137 | (2) |
|
Introducing SQL Server Management Studio |
|
|
139 | (30) |
|
The New Management Studio Interface |
|
|
140 | (5) |
|
|
140 | (1) |
|
|
141 | (1) |
|
Positioning a Docking Window |
|
|
142 | (1) |
|
Window Customization Options |
|
|
143 | (1) |
|
Connecting to a Database Server |
|
|
144 | (1) |
|
|
145 | (4) |
|
|
146 | (3) |
|
Management Studio Solutions, Projects, and Files |
|
|
149 | (5) |
|
|
150 | (2) |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
154 | (4) |
|
|
154 | (1) |
|
Creating Table-Related Objects |
|
|
155 | (1) |
|
|
156 | (1) |
|
Setting Properties for New Users |
|
|
157 | (1) |
|
Generating Scripts from Objects |
|
|
158 | (1) |
|
|
158 | (4) |
|
|
159 | (3) |
|
|
162 | (1) |
|
|
163 | (3) |
|
|
164 | (2) |
|
|
166 | (1) |
|
|
166 | (1) |
|
Database Engine Tuning Advisor |
|
|
167 | (1) |
|
|
167 | (2) |
|
Using SQL Server Management Objects (SMO) |
|
|
169 | (22) |
|
|
170 | (4) |
|
|
170 | (4) |
|
|
174 | (1) |
|
Working SMO in Visual Studio |
|
|
174 | (16) |
|
Iterating Through Available Servers |
|
|
177 | (1) |
|
Retrieving Server Settings |
|
|
178 | (4) |
|
Creating Backup-and-Restore Applications |
|
|
182 | (6) |
|
Performing Programmatic DBCC Commands with SMO |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
191 | (28) |
|
Four Themes of the Security Framework |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
SQL Server 2005 Security Overview |
|
|
193 | (3) |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
195 | (1) |
|
Authentication and Authorization |
|
|
196 | (8) |
|
How Clients Establish a Connection |
|
|
196 | (1) |
|
|
197 | (2) |
|
|
199 | (2) |
|
|
201 | (3) |
|
Encryption Support in SQL Server 2005 |
|
|
204 | (7) |
|
Encrypting Data on the Move |
|
|
205 | (1) |
|
|
206 | (5) |
|
Protecting SQL Server 2005 |
|
|
211 | (2) |
|
Reducing the Surface Area for Attack |
|
|
211 | (2) |
|
How Hackers Attack SQL Server |
|
|
213 | (2) |
|
Direct Connection to the Internet |
|
|
213 | (1) |
|
|
213 | (1) |
|
SQL Server Browser Service |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
214 | (1) |
|
|
215 | (4) |
|
Part II Applications Development and Reach Technologies |
|
|
|
ADO.NET 2.0, Typed DataSet Objects, and .NET Data Binding |
|
|
219 | (42) |
|
A Brief History of Data Access Object Models |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
220 | (1) |
|
Enter OLE DB and ADO ``Classic'' |
|
|
220 | (1) |
|
|
221 | (1) |
|
What's New in ADO.NET 2.0? |
|
|
221 | (2) |
|
New Typed DataSet Members |
|
|
222 | (1) |
|
|
222 | (1) |
|
Typed DataSet Enhancements |
|
|
223 | (10) |
|
DataTable Objects in the Typed DataSet Designer |
|
|
225 | (1) |
|
|
226 | (1) |
|
Connection String Management |
|
|
226 | (2) |
|
Using the TableAdapter Configuration Wizard |
|
|
228 | (2) |
|
More on Queries and Parameters |
|
|
230 | (1) |
|
|
231 | (1) |
|
DBDirect Methods and Connected Use of Typed DataSet Objects |
|
|
232 | (1) |
|
Standalone DataTable Objects |
|
|
233 | (1) |
|
``Pure'' ADO.NET: Working in Code |
|
|
233 | (11) |
|
|
234 | (1) |
|
|
235 | (2) |
|
Responsive Uls: Executing Queries Asynchronously |
|
|
237 | (5) |
|
Not for Servers Only: Client-Side Bulk Copy |
|
|
242 | (2) |
|
It's Not Just Text: Processing XML Columns with ADO.NET and the System.Xml Namespace |
|
|
244 | (3) |
|
Nothing but .NET: Consuming SQL CLR UDT Data as Native .NET Objects |
|
|
245 | (1) |
|
Back to the Drawing Board |
|
|
246 | (1) |
|
Embedding SQL CLR Objects in Typed DataSet Objects |
|
|
247 | (4) |
|
Adding a CLR Stored Procedure to a Typed DataSet |
|
|
247 | (2) |
|
|
249 | (1) |
|
|
250 | (1) |
|
Windows Forms Data Binding |
|
|
251 | (7) |
|
|
252 | (1) |
|
|
253 | (1) |
|
|
253 | (1) |
|
Binding to Stored Procedures and Views |
|
|
254 | (1) |
|
|
254 | (1) |
|
Master-Detail and Lookup Binding |
|
|
254 | (3) |
|
Parameterized Query Data Binding |
|
|
257 | (1) |
|
|
258 | (3) |
|
Typed DataSet Objects and the Web.config File |
|
|
258 | (1) |
|
The Data Source Configuration Wizard, the ObjectDataSource Control, and the New Data-Bound Controls |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
261 | (40) |
|
|
262 | (2) |
|
|
264 | (12) |
|
Creating Database Connections |
|
|
264 | (3) |
|
T-SQL ``Step Into'' Debugging |
|
|
267 | (9) |
|
|
276 | (8) |
|
|
279 | (1) |
|
|
280 | (3) |
|
Breakpoints and Context Switching |
|
|
283 | (1) |
|
Mixing SQL CLR and T-SQL Code |
|
|
284 | (5) |
|
|
289 | (1) |
|
Debugging Queries External to Visual Studio |
|
|
289 | (3) |
|
|
292 | (7) |
|
|
292 | (2) |
|
Server Firewall Considerations |
|
|
294 | (1) |
|
|
295 | (1) |
|
Client Firewall Configuration |
|
|
295 | (2) |
|
Attaching to a Remote Process |
|
|
297 | (2) |
|
|
299 | (2) |
|
SQL Server 2005 Native XML Web Services |
|
|
301 | (28) |
|
Understanding Native XML Web Services |
|
|
302 | (1) |
|
Comparing Native XML Web Services and SQLXML |
|
|
302 | (1) |
|
Exposing SQL Programmability as Web Services |
|
|
303 | (9) |
|
Stored Procedures and User-Defined Functions |
|
|
303 | (1) |
|
|
303 | (1) |
|
Reserving URLs with Http.sys |
|
|
303 | (1) |
|
Creating and Managing Endpoints |
|
|
304 | (5) |
|
Granting Endpoint Permissions |
|
|
309 | (1) |
|
Calling Native XML Web Service Endpoints from Client Applications |
|
|
310 | (2) |
|
Example Native XML Web Services Project |
|
|
312 | (12) |
|
Creating the SQL Server Functionality |
|
|
312 | (4) |
|
Registering the URL with Http.sys |
|
|
316 | (1) |
|
|
316 | (1) |
|
Granting Security Access to the Endpoints |
|
|
317 | (2) |
|
Creating the Client Application |
|
|
319 | (5) |
|
Best Practices for Using Native XML Web Services |
|
|
324 | (4) |
|
Advantages of Native XML Web Services |
|
|
325 | (1) |
|
Limitations of Native XML Web Services |
|
|
325 | (1) |
|
|
326 | (1) |
|
Performance Recommendations |
|
|
326 | (1) |
|
When to Avoid Native XML Web Services |
|
|
326 | (1) |
|
When to Use Native XML Web Services |
|
|
327 | (1) |
|
|
328 | (1) |
|
|
329 | (42) |
|
|
330 | (2) |
|
Understanding the ACID Properties |
|
|
330 | (2) |
|
Local Transactions Support in SQL Server 2005 |
|
|
332 | (8) |
|
Autocommit Transaction Mode |
|
|
333 | (1) |
|
Explicit Transaction Mode |
|
|
333 | (3) |
|
Implicit Transaction Mode |
|
|
336 | (1) |
|
Batch-Scoped Transaction Mode |
|
|
337 | (1) |
|
Using Local Transactions in ADO.NET |
|
|
338 | (2) |
|
|
340 | (1) |
|
|
341 | (6) |
|
Isolation Levels in SQL Server 2005 |
|
|
341 | (5) |
|
Isolation Levels in ADO.NET |
|
|
346 | (1) |
|
|
347 | (17) |
|
Distributed Transaction Terminology |
|
|
348 | (1) |
|
Rules and Methods of Enlistment |
|
|
349 | (2) |
|
Distributed Transactions in SQL Server 2005 |
|
|
351 | (1) |
|
Distributed Transactions in the .NET Framework |
|
|
352 | (8) |
|
Using a Resource Manager in a Successful Transaction |
|
|
360 | (4) |
|
Transactions in SQL CLR (CLR Integration) |
|
|
364 | (4) |
|
|
368 | (1) |
|
|
369 | (2) |
|
SQL Server Service Broker: The New Middleware |
|
|
371 | (22) |
|
|
371 | (1) |
|
What Is SQL Server Service Broker? |
|
|
372 | (1) |
|
Comparing Service Broker and MSMQ |
|
|
372 | (1) |
|
What Is a SQL Server Service Broker Application? |
|
|
373 | (1) |
|
Service Broker Architecture |
|
|
374 | (3) |
|
Integrated Management and Operation |
|
|
377 | (1) |
|
Routing and Load Balancing |
|
|
377 | (2) |
|
Service Broker Programming in T-SQL |
|
|
379 | (1) |
|
A Word About Programming Languages |
|
|
380 | (1) |
|
|
380 | (1) |
|
Defining Service Broker Objects |
|
|
380 | (7) |
|
The Sending Service Program |
|
|
382 | (1) |
|
The Receiving Service Program |
|
|
383 | (2) |
|
|
385 | (1) |
|
A More Robust, Real-World Application |
|
|
386 | (1) |
|
Service Broker and Query Notification |
|
|
387 | (4) |
|
Service Broker's Place in the Middleware World |
|
|
391 | (1) |
|
|
392 | (1) |
|
Using SQL Server 2005 Notification Services |
|
|
393 | (34) |
|
What Is a Notification Application? |
|
|
393 | (4) |
|
Notification Services Components |
|
|
394 | (2) |
|
Notification Services Deployment Strategies |
|
|
396 | (1) |
|
Working with Notification Services |
|
|
397 | (3) |
|
Creating Notification Applications |
|
|
398 | (2) |
|
A Sample Notification Application |
|
|
400 | (24) |
|
Flight Price Notification Sample Application |
|
|
400 | (24) |
|
|
424 | (3) |
|
Developing Desktop Applications with SQL Server Express Edition |
|
|
427 | (60) |
|
What Is SQL Server Express Edition? |
|
|
427 | (8) |
|
|
429 | (1) |
|
|
429 | (2) |
|
SQL Server 2005 Express Edition with Advanced Services |
|
|
431 | (4) |
|
|
435 | (2) |
|
Working with SQL Server Express Edition |
|
|
437 | (14) |
|
|
442 | (4) |
|
|
446 | (3) |
|
|
449 | (2) |
|
Installing SQL Server Express Edition |
|
|
451 | (34) |
|
Using the Setup Wizard to Manually Install Express Edition |
|
|
452 | (4) |
|
Installing via Command-Line Parameters or a Configuration File |
|
|
456 | (4) |
|
Deploying Express Edition Applications Using a Wrapper |
|
|
460 | (11) |
|
Deploying Express Edition Applications Using ClickOnce |
|
|
471 | (4) |
|
Updating ClickOnce Deployments That Use Express Edition |
|
|
475 | (10) |
|
|
485 | (2) |
|
Developing Applications with SQL Server 2005 Everywhere Edition and SQL Server Merge Replication |
|
|
487 | (36) |
|
SQL Everywhere Integration with SQL Server 2005 |
|
|
488 | (8) |
|
Working with SQL Everywhere Databases in Management Studio |
|
|
489 | (4) |
|
Working with SQL Everywhere Data in Management Studio |
|
|
493 | (3) |
|
Creating a SQL Everywhere Application with SQL Server Replication and Visual Studio 2005 |
|
|
496 | (24) |
|
|
498 | (7) |
|
Installing and Configuring SQL Everywhere Server Components for IIS |
|
|
505 | (3) |
|
Creating a Subscription Using Management Studio |
|
|
508 | (5) |
|
Creating a Mobile Application Using Visual Studio 2005 |
|
|
513 | (7) |
|
|
520 | (3) |
|
Part III Reporting and Business Intelligence |
|
|
|
Using SQL Server 2005 Integration Services |
|
|
523 | (50) |
|
History of Data Transfer in SQL Server |
|
|
523 | (1) |
|
|
524 | (1) |
|
Working with Integration Services Packages |
|
|
524 | (8) |
|
|
524 | (2) |
|
|
526 | (6) |
|
Using Integration Services Packages |
|
|
532 | (5) |
|
Creating Packages Using the Import And Export Wizard |
|
|
532 | (1) |
|
Creating Packages Using BI Development Studio |
|
|
533 | (1) |
|
Managing Packages Using Management Studio |
|
|
533 | (1) |
|
Using the Command Line to Execute and Manage Packages |
|
|
533 | (1) |
|
Scheduling Packages Using SQL Server Agent |
|
|
534 | (1) |
|
Configuring and Deploying Packages |
|
|
535 | (1) |
|
Overview of Programming Package Extension |
|
|
536 | (1) |
|
|
537 | (2) |
|
Dealing with Sensitive Information and Assets |
|
|
537 | (1) |
|
Considerations for Working on a Single Development Machine |
|
|
538 | (1) |
|
Considerations for Workgroups |
|
|
538 | (1) |
|
Programming Integration Services |
|
|
539 | (15) |
|
Programming in Visual Studio |
|
|
539 | (1) |
|
Loading and Executing Packages in Applications |
|
|
539 | (1) |
|
Creating Packages Programmatically |
|
|
540 | (14) |
|
|
554 | (18) |
|
|
554 | (1) |
|
|
555 | (1) |
|
|
556 | (10) |
|
|
566 | (5) |
|
Custom Connection Managers |
|
|
571 | (1) |
|
|
572 | (1) |
|
|
572 | (1) |
|
|
572 | (1) |
|
|
573 | (28) |
|
|
573 | (2) |
|
|
575 | (3) |
|
|
576 | (1) |
|
Dimensions, Axes, Stars, and Snowflakes |
|
|
576 | (2) |
|
|
578 | (19) |
|
Preparing Star Schema Objects |
|
|
579 | (1) |
|
|
579 | (2) |
|
|
581 | (1) |
|
Adding a Data Source View |
|
|
582 | (4) |
|
Creating a Cube with the Cube Wizard |
|
|
586 | (3) |
|
|
589 | (2) |
|
Using the Dimension Wizard |
|
|
591 | (3) |
|
Using the Dimension Designer |
|
|
594 | (2) |
|
Working with the Properties Window and Solution Explorer |
|
|
596 | (1) |
|
|
597 | (1) |
|
|
597 | (2) |
|
|
599 | (2) |
|
|
601 | (66) |
|
What We'll Cover in This Chapter |
|
|
602 | (1) |
|
|
602 | (1) |
|
And Now a Word from Our Sponsor |
|
|
603 | (1) |
|
Advanced Dimensions and Measures |
|
|
603 | (19) |
|
|
604 | (2) |
|
|
606 | (1) |
|
Adding a Named Query to a Data Source View |
|
|
607 | (2) |
|
|
609 | (5) |
|
|
614 | (1) |
|
|
615 | (2) |
|
|
617 | (3) |
|
|
620 | (1) |
|
|
621 | (1) |
|
|
622 | (11) |
|
|
623 | (6) |
|
|
629 | (1) |
|
|
629 | (4) |
|
Key Performance Indicators |
|
|
633 | (12) |
|
KPI Visualization: Status and Trend |
|
|
634 | (1) |
|
|
635 | (2) |
|
Testing KPIs in Browser View |
|
|
637 | (2) |
|
KPI Queries in Management Studio |
|
|
639 | (4) |
|
Other BI Tricks in Management Studio |
|
|
643 | (2) |
|
|
645 | (3) |
|
|
645 | (1) |
|
|
645 | (2) |
|
|
647 | (1) |
|
Partitions, Aggregation Design, Storage Settings, and Proactive Caching |
|
|
648 | (6) |
|
Editing and Creating Partitions |
|
|
649 | (2) |
|
|
651 | (1) |
|
Partition Storage Options |
|
|
652 | (1) |
|
|
652 | (2) |
|
Additional Features and Tips |
|
|
654 | (1) |
|
|
654 | (3) |
|
|
657 | (5) |
|
|
662 | (3) |
|
|
665 | (2) |
|
OLAP Application Development |
|
|
667 | (74) |
|
|
668 | (23) |
|
|
669 | (7) |
|
Using PivotTables and Charts in Applications and Web Pages |
|
|
676 | (15) |
|
Beyond OWC: Full-On OLAP Development |
|
|
691 | (48) |
|
MDX and Analysis Services APIs |
|
|
691 | (1) |
|
|
692 | (1) |
|
Management Studio as an MDX Client |
|
|
692 | (14) |
|
OLAP Development with ADO MD.NET |
|
|
706 | (12) |
|
XMLA at Your (Analysis) Service |
|
|
718 | (11) |
|
Analysis Services CLR Support: Server-Side ADO MD.NET |
|
|
729 | (10) |
|
|
739 | (2) |
|
Extending Your Database System with Data Mining |
|
|
741 | (78) |
|
|
742 | (3) |
|
|
745 | (7) |
|
Preparing Your Source Data |
|
|
745 | (2) |
|
Creating Training and Test Samples |
|
|
747 | (5) |
|
|
752 | (1) |
|
Using the Data Mining Wizard and Data Mining Designer |
|
|
752 | (30) |
|
Creating a Mining Structure |
|
|
755 | (1) |
|
|
755 | (3) |
|
Editing and Adding Mining Models |
|
|
758 | (5) |
|
Deploying and Processing Data Mining Objects |
|
|
763 | (2) |
|
|
765 | (8) |
|
Validating and Comparing Mining Models |
|
|
773 | (3) |
|
|
776 | (6) |
|
Using Data Mining Extensions |
|
|
782 | (18) |
|
Data Mining Modeling Using DMX |
|
|
782 | (10) |
|
Data Mining Predictions Using DMX |
|
|
792 | (7) |
|
|
799 | (1) |
|
|
800 | (17) |
|
Data Mining and API Programming |
|
|
801 | (1) |
|
Using the WinForms Model Content Browser Controls |
|
|
801 | (3) |
|
Executing Prediction Queries with ADO MD.NET |
|
|
804 | (1) |
|
|
804 | (1) |
|
|
805 | (1) |
|
Using the Data Mining Web Controls |
|
|
805 | (1) |
|
Developing Managed Stored Procedures |
|
|
806 | (2) |
|
|
808 | (2) |
|
Data Mining and Reporting Services |
|
|
810 | (7) |
|
|
817 | (2) |
|
|
819 | (50) |
|
Report Definition and Design |
|
|
820 | (23) |
|
|
820 | (2) |
|
|
822 | (4) |
|
|
826 | (12) |
|
|
838 | (5) |
|
Report Definition Language |
|
|
843 | (1) |
|
|
843 | (9) |
|
|
843 | (1) |
|
|
844 | (7) |
|
SQL Server Management Studio |
|
|
851 | (1) |
|
|
852 | (1) |
|
Programming: Management Web Services |
|
|
852 | (1) |
|
Report Access and Delivery |
|
|
852 | (10) |
|
|
852 | (3) |
|
|
855 | (2) |
|
|
857 | (2) |
|
|
859 | (3) |
|
Report Server Architecture |
|
|
862 | (5) |
|
|
865 | (1) |
|
|
865 | (2) |
|
|
867 | (1) |
|
|
867 | (2) |
Index |
|
869 | |