39 P ART 2 D ATABASE D EVELOPMENT ...41 EDITED BY ADAM MACHANIC H UGO K ORNELIS The common methods and their shortcomings 43 Declarative set-based code 44 ■ Iterative cursor-based code 4
Trang 1MVP CONTRIBUTORS
John Baird ● Bob Beauchemin ● Itzik Ben-Gan ● Glenn Berry ● Aaron Bertrand ● Phil Brammer ● Robert C Cain ● Michael Coles ● John Paul Cook ● Hilary Cotter ●Louis Davidson ● Christopher Fairbairn ● Rob Farley ● Denis Gobo ● Bill Graziano ● Dan Guzman ● Paul Ibison ● Tibor Karaszi ● Kathi Kellenberger ● Don Kiely ●Kevin Kline ● Hugo Kornelis ● Alex Kuznetsov ● Matija Lah ● Cristian Lefter ● Andy Leonard ● Greg Linwood ● Bruce Loehle-Conger ● Brad McGehee ● Paul Nielsen ●Pawel Potasinski ● Matthew Roche ● Dejan Sarka ● Edwin Sarmiento ● Gail Shaw ● Linchi Shea ● Richard Siddaway ● Jasper Smith ● Erland Sommarskog ●Scott Stauffer ● Tom van Stiphout ● Gert-Jan Strik ● Ron Talmage ● William R Vaughn ● Joe Webb ● John Welch ● Erin Welker ● Allen White
DEEP DIVES
E DITED BY
Paul Nielsen Kalen Delaney Greg Low Adam Machanic Paul S Randal Kimberly L Tripp
Author royalties go to support War Child International
Trang 2SQL Server MVP Deep Dives
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 4Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 5For online information and ordering of this and other Manning books, please visit
www.manning.com The publisher offers discounts on this book when ordered in quantity
For more information, please contact
Special Sales DepartmentManning Publications Co
Sound View Court 3BGreenwich, CT 06830Email: orders@manning.com
©2010 by Manning Publications Co All rights reserved
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in
any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial caps
or all caps
Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end
Recognizing also our responsibility to conserve the resources of our planet, Manning books
are printed on paper that is at least 15 percent recycled and processed without the use of
elemental chlorine
Development editor: Jeff Bleiel
ISBN 978-1-935182-04-7
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – MAL – 14 13 12 11 10 09
Trang 6MVP contributors and their chapters
John Baird 23 Bob Beauchemin 15 Itzik Ben-Gan 5 Glenn Berry 34, 47 Aaron Bertrand 29, 53 Phil Brammer 58 Robert C Cain 13 Michael Coles 10, 11 John Paul Cook 39 Hilary Cotter 37 Louis Davidson 1, 2 Christopher Fairbairn 22 Rob Farley 7, 40
Denis Gobo 8, 20 Bill Graziano 6 Dan Guzman 32 Paul Ibison 36 Tibor Karaszi 25 Kathi Kellenberger 9 Don Kiely 16
Kevin Kline 45 Hugo Kornelis 3, 4 Alex Kuznetsov 41 Matija Lah 12
Cristian Lefter 21, 49 Andy Leonard 59 Greg Linwood 33 Bruce Loehle-Conger 52 Brad McGehee 24, 43 Paul Nielsen 1
Pawel Potasinski 19 Matthew Roche 57 Dejan Sarka 54 Edwin Sarmiento 35 Gail Shaw 42 Linchi Shea 48 Richard Siddaway 26 Jasper Smith 28 Erland Sommarskog 17 Scott Stauffer 38 Tom van Stiphout 14 Gert-Jan Strik 46 Ron Talmage 31 William R Vaughn 18, 51 Joe Webb 30, 44
John Welch 56 Erin Welker 55 Allen White 27
Technical Editor Rod Colledge
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 8To all children traumatized by the horrors of war and War Child’s efforts to help children be children again
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 10brief contents
1 Louis and Paul’s 10 key relational database design ideas 3
2 SQL Server tools for maintaining data integrity 11
3 Finding functional dependencies 28
P ART 2 D ATABASE D EVELOPMENT 41
4 Set-based iteration, the third alternative 43
5 Gaps and islands 59
6 Error handling in SQL Server and applications 73
7 Pulling apart the FROM clause 86
8 What makes a bulk insert a minimally logged operation? 102
9 Avoiding three common query mistakes 111
10 Introduction to XQuery on SQL Server 119
11 SQL Server XML frequently asked questions 133
12 Using XML to transport relational data 150
13 Full-text searching 176
14 Simil: an algorithm to look for similar strings 200
15 LINQ to SQL and ADO.NET Entity Framework 210
16 Table-valued parameters 221
17 Build your own index 234
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 1118 Getting and staying connected—or not 255
19 Extending your productivity in SSMS and Query Analyzer 277
20 Why every SQL developer needs a tools database 283
21 Deprecation feature 291
22 Placing SQL Server in your pocket 297
23 Mobile data strategies 305
P ART 3 D ATABASE A DMINISTRATION 319
24 What does it mean to be a DBA? 321
25 Working with maintenance plans 330
26 PowerShell in SQL Server 344
27 Automating SQL Server Management using SMO 353
28 Practical auditing in SQL Server 2008 365
29 My favorite DMVs, and why 381
30 Reusing space in a table 403
31 Some practical issues in table partitioning 413
32 Partitioning for manageability (and maybe performance) 421
33 Efficient backups without indexes 432
34 Using database mirroring to become a superhero! 449
35 The poor man’s SQL Server log shipping 463
36 Understated changes in SQL Server 2005 replication 475
37 High-performance transactional replication 484
38 Successfully implementing Kerberos delegation 496
39 Running SQL Server on Hyper-V 518
40 When is an unused index not an unused index? 531
41 Speeding up your queries with index covering 541
42 Tracing the deadlock 549
43 How to optimize tempdb performance 558
44 Does the order of columns in an index matter? 566
45 Correlating SQL Profiler with PerfMon 575
46 Using correlation to improve query performance 583
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 1247 How to use Dynamic Management Views 590
48 Query performance and disk I/O counters 606
49 XEVENT: the next event infrastructure 619
P ART 5 B USINESS INTELLIGENCE 631
50 BI for the relational guy 633
51 Unlocking the secrets of SQL Server 2008 Reporting
Services 642
52 Reporting Services tips and tricks 660
53 SQL Server Audit, change tracking, and change
data capture 670
54 Introduction to SSAS 2008 data mining 687
55 To aggregate or not to aggregate—is there really a question? 700
56 Incorporating data profiling in the ETL process 709
57 Expressions in SQL Server Integration Services 726
58 SSIS performance tips 743
59 Incremental loads using T-SQL and SSIS 750
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 14contentspreface xxxv
acknowledgments xxxviii about War Child xxxix about this book xli about SQL Server MVPs xliii
P ART 1 D ATABASE DESIGN AND ARCHITECTURE 1
EDITED BY PAUL NIELSEN
P AUL N IELSEN AND L OUIS D AVIDSON
1 Denormalization is for wimps 3
2 Keys are key 4
3 Generalize, man! 5
4 Class <> table 5
5 Data drives design 6
6 Sets good, cursors bad 6
7 Properly type data 7
8 Extensibility through encapsulation 7
9 Spaghetti is food, not code 7
10 NOLOCK = no consistency 8
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 152 SQL Server tools for maintaining data integrity 11
L OUIS D AVIDSON
Protection tools 12
Data types 13 ■ NULL specification 13 ■ Uniqueness constraints 14 ■ Filtered unique indexes 15 ■ Foreign key constraints 16 ■ Check constraints 17 ■ Triggers 20
When and why to use what tool 24
H UGO K ORNELIS
Interview method 28 Modeling the sales order 29
First step: finding single-attribute dependencies 31 ■ Second step: finding two-attribute dependencies 36 ■ Further steps: three-and-more-attribute dependencies 39 ■ What if I have some independent attributes left? 39
P ART 2 D ATABASE D EVELOPMENT 41
EDITED BY ADAM MACHANIC
H UGO K ORNELIS
The common methods and their shortcomings 43
Declarative (set-based) code 44 ■ Iterative (cursor-based) code 45
Solutions to gaps problem 61
Gaps—solution 1 using subqueries 62 ■ Gaps—solution 2 using subqueries 63 ■ Gaps—solution 3 using ranking functions 64 Gaps—solution 4 using cursors 64 ■ Performance summary for gaps solutions 65
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 16Solutions to islands problem 66
Islands—solution 1 using subqueries and ranking calculations 66 Islands—solution 2 using group identifier based on subqueries 67 Islands—solution 3 using group identifier based on ranking calculations 68 ■ Islands—solution 4 using cursors 69 Variation on the islands problem 69 ■ Performance summary for islands solutions 71
B ILL G RAZIANO
Handling errors inside SQL Server 73
Returning information about the error 74 ■ Generate your own errors using RAISERROR 76 ■ Nesting TRY CATCH blocks 77 ■ TRY CATCH and transactions 79
Handling SQL Server errors on the client 80
Handling SQL Server messages on the client 82
Formatting your FROM clause 89
A sample query 89 ■ The appearance of most queries 90 When the pattern doesn’t apply 90 ■ How to read a FROM clause 91 ■ When the pattern can’t apply 91 ■ Writing the FROM clause clearly the first time 92
Filtering with the ON clause 92
The different filters of the SELECT statement 93 ■ Filtering out the matches 93
JOIN uses and simplification 94 The four uses of JOINs 94 Simplification using views 96 How JOIN uses affect you 100
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 178 What makes a bulk insert a minimally logged operation? 102
D ENIS G OBO
Recovery and locking 102 Creating the file to import 104 Creating the tables to store the data 105 Importing the data 106
K ATHI K ELLENBERGER
Incorrect GROUP BY clauses 116
M ICHAEL C OLES
What is XQuery? 119 How XQuery sees your XML 122
FLWOR expressions 127 XQuery comparison operators 129 XML indexes and XQuery performance 132
The xml data type 138
Why does SQL Server remove the DTD from my XML data? 138 How do I preserve whitespace in my XML? 139 ■ Why am I getting strange characters in my XML? 139 ■ How do I query XML data? 141 ■ How do I query a single value from my XML data? 141 ■ How do I shred XML data? 142
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 18Advanced query topics 144
How do I specify an XML namespace in my XQuery queries? 145 How do I get all element names and values from my XML
document? 146 ■ How do I load XML documents from the filesystem? 147
M ATIJA L AH
Understanding before coding 150
The concept 150 ■ The logical model 152 ■ The physical model 154 ■ The database 155 ■ The XML Schema 155
Enabling and maintaining the data flow 160
Preparing the inbound data flow 160 ■ Importing the data 163 Exporting the data 171
Preparing the sample data 173
Creating the full-text index 178 ■ Maintaining full-text indexes 180
Querying full-text indexes 181
Basic searches 181 ■ FORMSOF 182 ■ Phrases, NEAR, OR, and prefixed terms 183 ■ Ranking 184
Custom thesaurus and stopwords 186
Custom thesaurus 186 ■ Stopwords and stoplists 189
Useful system queries 192
Basic queries to discover what catalogs, indexes, and columns exist 192 ■ Advanced queries 194 ■ The keywords 196
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 1914 Simil: an algorithm to look for similar strings 200
T OM VAN S TIPHOUT
Equals (=) and LIKE 201
Optimizing the number of database round trips 215 LINQ to SQL and stored procedures 217
Tuning and LINQ to SQL queries 218
Using TVPs from client applications 226
Using a DataTable 227 ■ Using a DbDataReader 228 Using TVPs to enter orders 229
Trang 20Fragments and persons 237
The fragments_persons table 237 ■ Writing the search procedure 238 ■ Keeping the index and the statistics updated 241 ■ What is the overhead? 242
Fragments and lists 243
Building the lists 244 ■ Unwrapping the lists 244 The fragments_personlists table 245 ■ Loading the table 245
A search procedure 248 ■ Keeping the lists updated 249
Using bitmasks 250
The initial setup 250 ■ Searching with the bitmask 251 Adapting the bitmask to the data 251 ■ Performance and overhead 252 ■ The big bitmask 253
W ILLIAM V AUGHN
What is SQL Server? 255 Understanding the SQL Server Browser service 256 Diagnosing a connectivity problem 257
Testing for network availability 257 ■ Managing the SQL Server instance state 258 ■ Finding visible SQL Server instances 259
What is a connection? 261
To connect or not to connect 263
Connection strategies 265 Establishing a connection 266 The server key 268
Trusted or untrusted security? 269
Using trusted or integrated security 270 ■ ASP.NET considerations 270 ■ Using SQL Server authentication 271
Accepting user login credentials—or not 272 Accessing user instances 272
Connection pooling 273 Closing the connection 275
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 2119 Extending your productivity in SSMS and Query Analyzer 277
P AWEL P OTASINSKI
Custom keyboard shortcuts 277 Creating your custom utility to use with keyboard shortcuts 279
Some ideas for utilities to implement 282
Using an auxiliary table of numbers 284
Generating a calendar on the fly 284 ■ Splitting strings with a numbers table 286
Placing common code in the tools database 288 Formatting 289
Calling code from a different database 290
Deploying on a desktop 299 ■ Deploying on a device 300 XCOPY deployment 300
Tool support 300 Programming support 302
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 22J OHN B AIRD
Microsoft Sync Framework (MSF) 306
Client synchronization provider 306 ■ Server synchronization provider 306 ■ Synchronization adapter 307
Synchronization agent 308 ■ Using MSF 310
Comparison 316
P ART 3 D ATABASE A DMINISTRATION 319
EDITED BY PAUL S RANDAL AND KIMBERLY L TRIPP
What is a maintenance plan, and how do I create one? 330
Versions and service packs 331 ■ One or several schedules per plan? 331 ■ Wizard dialogs 332 ■ Task types 332 Check database integrity task 333 ■ Shrink database task 333 Reorganize index task 334 ■ Rebuild index task 335
Update statistics task 335 ■ History cleanup task 336 Execute SQL Server Agent job task 338 ■ Back up database task 338 ■ Maintenance cleanup task 340 ■ Select reporting options 341 ■ Execute T-SQL statement task 341
Executing and monitoring the plan 342
R ICHARD S IDDAWAY
PowerShell overview 344
PowerShell features 344 ■ PowerShell issues and solutions 345
PowerShell with SQL Server 2000 and 2005 346
Data access 346 ■ Administration 347
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 23PowerShell with SQL Server 2008 348
J ASPER S MITH
Overview of audit infrastructure 365
Server audit objects 365 ■ Server audit specification objects 366 Database audit specification objects 366
Server audit specifications 372
Creating server audit specifications 372 ■ Viewing audit events 374
Database audit specifications 376
Creating database audit specifications 376
A ARON B ERTRAND
What is so great about DMVs, anyway? 381
A brief list of my favorite DMVs and DMFs 383
sys.dm_os_sys_info 383 ■ sys.dm_exec_sessions, sys.dm_exec_requests, and sys.dm_exec_connections 383 sys.dm_exec_sql_text 384 ■ sys.dm_exec_query_stats 384
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 24sys.dm_exec_procedure_stats 384 sys.dm_db_index_usage_stats 385 sys.dm_db_missing_index_details, sys.dm_db_missing_index_groups, and sys.dm_db_missing_index_group_stats 385
Honorable mentions 385
sys.dm_os_performance_counters 385 sys.dm_db_partition_stats 386 sys.dm_db_index_physical_stats 386 sys.dm_sql_referenced_entities 387
Setting up a utility database 387 Some interesting applications of my favorite DMVs 390
A more refined sp_who or sp_who2 390 ■ Getting statistics for stored procedures (SQL Server 2008 only) 393 ■ Finding unused stored procedures (SQL Server 2008 only) 394 ■ Finding inefficient and unused indexes 396 ■ Finding inefficient queries 398 ■ Finding missing indexes 399
Drilling down: using SPLIT and MERGE 417 ■ Drilling down: using SWITCH 418
The key: avoiding data movement 419 Sources for more information 419
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 2532 Partitioning for manageability (and maybe performance) 421
D AN G UZMAN
Overview 421 How to partition 423 Planning and design considerations 424 Gotchas and tips 429
Boundary time values 429 ■ SPLIT and MERGE performance 430 ■ Update statistics after SWITCH 430 Shared partition functions and schemes 430
Backing up only the PRIMARY filegroup 436 Restoring the PRIMARY filegroup backup 436
Restoring for extraction only 437 ■ Restoring for production use 437 ■ Restoring for production use—step by step 439
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 26More efficient methodologies 481
Remove redundant pre-snapshot and post-snapshot scripts 481 Replace merge -EXCHANGETYPE parameters 482
Large numbers of push subscriptions 492
Optimal settings for replication 492
CommitBatchSize and CommitBatchThreshold 493 ■ Update proc 494 ■ SubscriptionStreams 495
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 2738 Successfully implementing Kerberos delegation 496
Understanding Kerberos delegation 498
Service principle names 498 ■ Constrained delegation 501
Implementing Kerberos delegation step by step 503
Configuring the Active Directory 503 ■ Configuring the client tier 505 ■ Configuring the web tier 508 ■ Configuring the data tier 510
Validating delegation from end to end 512
Downloading and installing DelegConfig 512 ■ Running DelegConfig from the web tier 512 ■ Running DelegConfig from the client tier 512
Resources to assist in more complex infrastructures 512
J OHN P AUL C OOK
Virtualization architecture 519 Benefits of isolation 520 Configuring virtual machines 521
Configuring disks 521 ■ CPU configuration 523 Configuring networking 524 ■ Memory configuration 525
Addressing clock drift issues 525 Backup considerations 525 Advantages of physical to virtual migration 526 Test environments and virtualization 526
P ART 4 P ERFORMANCE T UNING AND O PTIMIZATION 529
EDITED BY KALEN DELANEY
R OB F ARLEY
Overview of indexing 531 Unused indexes 532
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 28Unused indexes that are actually used 535 How is the unused index being used? 538 How does this affect me? 539
Covering indexes usually slow down modifications 545 One index should cover many queries 546
One index can both cover queries and implement uniqueness 547
G AIL S HAW
What’s a deadlock? 549 Causes of deadlocks 550 Deadlock graph 550
Trace flag 1204 550 ■ Trace flag 1222 551 ■ SQL Profiler 551 ■ Reading the deadlock graph 551 ■ The process list 552 ■ The resource list 555
The big picture 556
subsystem 563 ■ Adding RAM to your SQL server
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 29instance 564 ■ Using SQL Server 2008 transparent data encryption 564 ■ Leaving auto create statistics and auto update statistics on 564 ■ Verifying CHECKSUM for SQL Server 2008 564
When to expect correlation 588 Determining correlation 588
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 30SQL Server memory pressure 597 SQL Server index usage 600 Detecting blocking in SQL Server 603
Scenario 1: constant checkpoints 613 ■ Scenario 2: NOLOCK and faster query processing 614 ■ Scenario 3: read-ahead reads 615 Scenario 4: index fragmentation 616
Predicates 625 ■ Types and maps 625 ■ Sessions 626
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 31Microsoft BI stack 640 How do I get started? 640
Managing report parameters 650 ■ Deploying your report 651
Using the Report Manager 652 Using the Visual Studio MicrosoftReportViewer control 653 What’s in Reporting Services 2008 for developers? 654
Virtual directory changes 655 ■ Using SQL Server Reporting Services Configuration Manager 655 ■ Exporting reports 656
Trang 32B RUCE L OEHLE -C ONGER
Performance tips 660
Filters versus query parameters 660 ■ Linked servers 660 Drillthrough instead of drill-down 661 ■ Data export 662 Connection pooling 662
Design tips 663
Stored procedures and temp tables 663 ■ Excel merged cell solution 663 ■ Excel web queries and reports 664 ■ HTML or Word documents 667 ■ Server portability 667 ■ Embedding T-SQL
How does SQL Server 2008 solve these problems? 672
SQL Server Audit 673 ■ Change tracking 676 Change data capture 681
Comparison of features 685
D EJAN S ARKA
Data mining basics 688
Data mining projects 689 ■ Data overview and preparation 690 SSAS 2008 data mining algorithms 690
Creating mining models 691 Harvesting the results 693
Viewing the models 694 ■ Evaluating the models 695 Creating prediction queries 697
Sources for more information 698
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 3355 To aggregate or not to aggregate—is there really a question? 700
E RIN W ELKER
What are aggregations? 700 Designing aggregations 701 Influencing aggregations 702 Attribute relationships 704 Usage-based optimization 705 High-level approach 707 Other considerations 707
Making the Data Profiling task dynamic 716
Changing the database 716 ■ Altering the profile requests 716 Setting the ProfileInputXml property 717
Making data-quality decisions in the ETL 719
Excluding data based on quality 719 ■ Adjusting rules dynamically 719
Consuming the task output 720
Capturing the output 720 ■ Using SSIS XML functionality 721 Using scripts 723 ■ Incorporating the values in the package 723
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 34P HIL B RAMMER
SSIS overview 743 Control flow performance 743 Data flow performance 744
Source acquisition performance 744 ■ Data transformation performance 745 ■ Destination performance 746 ■ Lookup transformation performance 747 ■ General data flow performance 748
Creating the new BIDS project 754 ■ Defining the lookup transformation 755 ■ Setting the lookup transformation behavior 757
index 763
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 36preface
Each year Microsoft invites all the MVPs from every technology and country to mond for an MVP Summit—all top secret—“don’t tweet what you see!” During theMVP Summit, each product team holds a series of presentations where they explaintheir technologies, share their vision, and listen to some honest feedback
At the 2007 MVP Summit in Seattle, Bill Gates presented his vision of the future ofcomputing to the MVPs and then took questions for about an hour I really enjoy thesedialogues I get the sense that if BillG wasn’t the founder of Microsoft, he’d make agreat MVP You can tell he likes us as fellow Geeks, and he’s rather candid in the MVPQ&A time It’s one of my favorite parts of the MVP Summit
During the Q&A, the lines at the microphones are far too long to bother to join, so
I daydream a few questions I’d ask BillG:
As the world’s wealthiest Geek, what can you tell me about your PC?
Even with all your accomplishments, do you still find the most happiness andsatisfaction with your family?
Do you play Age of Empires 2, and if so, want to join me in a game?
Kirk or Picard?
Can I buy you lunch?
And then I thought of a good, deep, Charlie Rose-type of question: “Centuries fromnow, would you rather be remembered as the guy who put a computer on every desk,
or as the guy who ended malaria and fought the good fight against poverty?”
As I try to guess what BillG might say, the answer is obvious I’m glad that BillG’sintellect and resources are being directed at improving the human condition, and as
an original Windows fan I’m proud of BillG But the answer to my question isboth—Windows has already done as much to fight poverty as will the Bill and MelindaGates Foundation
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 37Toward the end of the Q&A time, which was mostly taken up with technical tions, I was thrilled to hear one of the MVPs ask for his advice as a philanthropist.BillG said that we should all be involved in our communities and give of ourselves increative ways: at the library, at schools, and with charities “Do philanthropy where youare.” This idea of giving of ourselves is central to the MVP community
I’d been noodling for a while with the idea of an MVP charity book to help dren, and I discussed it with my friend, Kalen Delaney, who liked the idea The nextstep was to float the idea past the other SQL Server MVPs and see if it resonated withany of them The response was overwhelming—within a couple of days, about 50MVPs had signed on to the project The question was, would a publisher bite?
My agent, David Fugate of Launch Books, offered to help us for free As Davidworked out how to assemble a contract with 50 authors, with all the author proceedsgoing to charity, Kalen and I pitched the idea to those we know in publishing WhenMichael Stephens of Manning Publications heard about it, he told me that Manningwanted in—that this was exactly the type of project that Manning wanted to publish.Mike liked both the community aspect of the project and the charity goals of the proj-ect Manning also offered us a higher than usual author royalty, because we’re giving
it all to charity
With a book contract under way, Kalen and I recruited Adam Machanic, Greg Low,Paul Randal, and Kimberly Tripp to help us with the editing The book was dividedinto five sections aligned with the five job roles around SQL Server—database archi-tecture and design, database development, database administration, performancetuning and optimization, and business intelligence There was no rigid organization
to the outline—MVPs were simply asked to submit abstracts for chapters that theywanted to write, and those abstracts were directed to the appropriate section editor.This would be a book driven by the MVPs’ individual passions, not by a comprehensivefeature list The section editors selected the best abstracts, but we committed to theidea that every MVP who wanted to contribute to the book could contribute
To select the charity, the MVPs nominated their choice with the restriction that ithad to be a non-sectarian group that benefited children And we wanted to give to asmaller charity—we didn’t just want our contribution to be added to a billion-dollarfund Hugo Kornelis had heard good things about War Child in the Netherlands, andhis nomination was selected in the first round of voting
I’m still amazed that this project came together The 53 MVPs who contributed tothis book did so for numerous personal reasons—a desire to make a difference in chil-dren’s lives, wanting to share knowledge, wanting to participate in a group effort forchange For some of us, it was an expression of our faith Several MVPs told me theywere glad to be a part of a project that reached beyond their typical circles and helpedchildren
If you are reading this book, then you are “rich.” Considering your place in humanhistory, you’re wealthier than most kings of centuries past—you are well educated,your grocery store shelves are full, you have a family doctor For too many in the
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 38world, that is not the case There are communities without clean water, children ing from war, and AIDS orphans who have no family or place to sleep When one pon-ders the immense need and poverty in the world, it’s easy to become overwhelmedwith hopelessness How can a single drop of ink change the color of an ocean? But wehave no other option than to do what we can My philosophy is that of Confucius: “It isbetter to light one small candle than to curse the darkness.”
Even BillG can’t heal the world, but we can each make a difference By buying thisbook, you’ve supported War Child I echo BillG’s words, that we should all find ways to
do philanthropy where we are I encourage you to find the best way you can to make adifference
So, welcome to SQL Server MVP Deep Dives—a collaborative work by 53 passionateMVPs
Trang 39To Marjan Bace, our publisher, thank you for helping us refine the concept, porting the project, and partnering with us
To Michael Stephens, Jeff Bleiel, Andy Carroll, Deepak Vohra, Katie Tennant, tie Marsico, Todd Green, Mary Piergies, and the rest of the team at Manning Publica-tions, thanks for believing in this project and enduring with it to the end
Thanks to Bill Vaughn for taking the group photo at the 2009 MVP Summit
A hearty thanks to Rod Colledge (SQL guru from Down Under, of crunch.com fame) for contributing his time as the technical editor Well done!
A thank you to David Fugate of Launch Books for helping us develop the idea andwork out the contract
Many thanks to Ed Lehman, our SQL Server product team MVP Liaison, for hissupport, the many good times, and all the great swag
To our MVP leads through the years, Shawn Aebi, Paul Wehland, Stephen Dybing,Ben Miller, Alison Brooks, and Suzanna Moran, and others internationally, thank youfor supporting our community efforts
To everyone in the Microsoft SQL Server product team, our enthusiastic thanks fordeveloping a product worthy of our passion
A heartfelt thank you to War Child for all you do for the children
And finally, thank you, readers, for supporting our project and helping us supportWar Child
PAUL NIELSEN
Trang 40about War Child
War Child International is an award-winning charity that provides opportunities andlong-term solutions for war-affected children, focusing on education, strengtheningchildren’s rights, reducing poverty, and fostering self-reliance War Child works inpartnership with local people and organizations to build sustainable programmingthat empowers children and their communities War Child Canada currently providessupport to communities in Afghanistan, Darfur, Sudan, Uganda, Sierra Leone, Demo-cratic Republic of Congo, Ethiopia, Sri Lanka, and Georgia Working closely with theentertainment and tech industries, War Child provides awareness, support, and actionfor children’s rights everywhere
Learn more at www.warchild.org and www.warchild.ca
A letter from the director of War Child follows on the next page
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com