I'll confess right here. I'm a SQL Server junkie. I want to know everything I can about how SQL Server works, exactly what the internal data structures look like, and what every bit in every status field means in the system tables. A full list of all the undocumented trace flags and DBCC commands would be my idea of the perfect birthday present.
I also feel like I was born to be a teacher. No matter how late I've been working or how hard it is to get myself out of bed in the morning, when I stand in front of a classroom, I'm in my element. I love sharing what I know about SQL Server, and I get even more excited when I have students who want to know about things that I've never even thought about. When I was asked to write the update for Ron Soukup's masterpiece, my first thought was that no one besides Ron could do the topic justice . But then I decided to look at the challenge of the book as the ultimate training assignment, with thousands of students in the classroom. If I was going to write any book on SQL Server 7, this would be the one. The topics it covers are all the ones that I love learning about and sharing. The topics it doesn't talk about are the ones that I haven't spent too much time with and don't really consider myself an expert on.
In Ron's preface to the first edition, he likens his love for SQL Server to his love for a child. I'll go one step further. Writing this book was like carrying and delivering a child. Not too stressful at first (I never did have much morning sickness) and lots of eager anticipation. But during the last few months, I felt like it would go on forever. It would never end! But now it has, and you have this book in your hands and are reading it.
Ron's preface mentions that this book is not an introductory treatise on SQL Server, and I want to emphasize the same point. This book delves deep into the internal workings of SQL Server and expects that you, the reader, have some experience with the SQL language and SQL Server already, as well as a fair amount of general technical sophistication.
This book, as the name implies, deals with the way SQL Server works on the inside . SQL Server 7 includes a wealth of new peripheral tools, but you'll have to get the details about them in other books. This book doesn't talk about client programming interfaces, heterogeneous queries, or replication. There are also some internal operations that aren't discussed, such as security and database backup and restore. I had to draw the line somewhere, or the book would have been twice as long and I would still be writing it and avoiding calls from my editors asking when the next chapter would be arriving. I hope you find value here, even if I haven't covered every single topic that you would like to know about. You can let me know what you'd like to learn more about, and maybe there'll be a second volume to this book one day. Or maybe I can refer you to other books or whitepapers. You can contact me through my Web site, at http://www.InsideSQLServer.com.
My editors insisted that this second edition wasn't supposed to be a new features guide or an upgrade book. However, I knew that lots of people who have used SQL Server for years would be reading this, and I felt it necessary to compare areas of behavior where drastic changes occurred. New users can just ignore any references to what SQL Server used to do and appreciate all the wonderful things it does now.
To help you appreciate some of the wonderful features even more, the companion CD includes a whitepaper section, which serves as a complete reference to the Transact-SQL language, including all the system stored procedures. Although this is a Microsoft Word document, it is actually intended for use on line, as many of the elements of a syntactic construct contain links to the further description of that element. When using the document on line, you can simply click on the colored element and be repositioned at the document with more details describing that element. I am grateful to Frank Pellow for sharing this document. He has included his e-mail address within the document and invites comments and suggestions from readers.
Now comes the part I have looked forward to the most (besides holding a published book in my hands). I get to thank all the wonderful people whose enthusiasm and generosity have made writing this book not only possible but almost a pleasure .
Thanks to Ron Soukup, for writing the first edition, and giving me his seal of approval for undertaking the second edition. Thanks to my editor at SQL Server Professional Journal, Karen Watterson, for opening so many doors for me, including passing my name on to the wonderful people at Microsoft Press.
The SQL Server development team at Microsoft has been awesome . David Campbell can never, ever be thanked enough, as far as I'm concerned . His enthusiasm for the book seemed to exceed my own at times, and his technical knowledge and clear explanations were priceless, as well as seemingly limitless. Goetz Graefe, Sameet Agarwal, Mike Habben, Wei Xiao, Nigel Ellis, Eric Christensen, Ross Bunker, Alazel Acheson, Lubor Kollar, and Shaun Cooper opened their doors to me and responded to (sometimes seemingly endless) e- mails . Cesar Galindo-Legaria, Peter Byrne, Greg Smith, Michael Zwilling, Jeff Alger, and Alan Brewer also offered valuable technical insights and information. Other members of the development team provided answers to e-mails, and I hope they all know how much I appreciated every piece of information I received. I am also indebted to Joe Marler and Bob Ward, who aren't really on the development team per se, but the technical information they were willing to share was just as valuable and their pride in SQL Server and dedication to the user community was evident in every e-mail I received from them.
A special thanks to several Microsoft program managers: Richard Waymire, for being a friend as well as a technical resource; David Marshall, for helping pull so many pieces together for the general architecture section in Chapter 3; Bob Vogt, who never seemed to tire of sharing all he could about his special projects, the Index Tuning Wizard, and SQL Server Profiler; and Hal Berenson, who was a tremendous help on the update of the history section in Chapter 1.
I received tremendous support from Ryan Trout and Tom Kreyche of the SQL Server marketing team, who provided advance copies of whitepapers, sample exercises for exploring new features, as well as T-shirts and toys bearing the SQL Server logo. Thank you so much for everything, especially your big smiles every time I stopped by.
Ryan Labrie made it possible for me to start down the long road of learning about SQL Server 7 shortly after the Beta 1 release by inviting me to help develop training materials for SQL Server 7. Rick Byham traveled down that long road with me as we worked together to produce the course, and we were able to spend every day for months doing nothing but learning about and playing with this powerful new version. I am grateful for that opportunity.
I found that other SQL Server trainers were the best help in digging into certain new behaviors and trying to figure out experientially what was really happening. Thanks to Glenn Christiansen for posing so many puzzling questions and Kimberly Tripp-Simonnet for wonderful ideas about how to explain things. Don Vilen deserves special thanks for trying to talk me out of writing this book; he said it would be much too much work. You were right, Don, but I did it anyway.
My editors at Microsoft Press deserve thanks also. Ben Ryan, my acquisitions editor, got the ball rolling. Michelle Goodman, the project editor, made sure the chapters kept coming, and my terrific technical editor, Dail Magee Jr., made sure they turned out well. But of course, Dail couldn't do it alone so I'd like to thank the rest of the editorial team, including many of you whom I never met. I know you worked endless hours to help make this book a reality.
Some people might think that working as an independent consultant and trainer would get lonely , as I don't have coworkers to chat with every day in the office. But I've got something even better. As a SQL Server MVP, I work with a dozen other SQL Server professionals to provide online support on the public newsgroups in the SQL Server forums. We share a private newsgroup with two Microsoft Support Engineers who serve as our interface with Microsoft, and through this newsgroup and yearly conferences and summits, I have gotten to know this group personally . Endless gratitude is due Neil Pike for his amazing generosity, both professional and personal. Neil, you are truly an inspiration. Roy Harvey and Brian Moran offered much needed moral support whenever I asked for it, and more importantly, when I didn't. To you three, and to the rest of the MVP crew: Tibor Karaszi, Ron Talmadge, Gianluca Hotz, Tony Rogerson, Bob Pfeiff, Steve Robertson, Trevor Dwyer, Russell Fields, and our Microsoft support buddies , Shawn Aebi and Paul Wehland, I'd like to let you know that being a part of your team has been the greatest honor and privilege of my professional life. I could not imagine working with a more dedicated, generous, and talented group of people.
There's another group of people without whose support and encouragement this book would have never seen the light of day. My husband Dan never faltered once in his absolute confidence in me and his endless encouragement. My multitalented daughter Melissa, who will be graduating from Tulane University this spring, has always been an awesome role model for me. She's someone who can make up her mind to do something or learn something and then just do it. My three sons Brendan, Rickey, and Connor, who are growing up to be generous, loving, and compassionate young men, have been the source of countless hugs and kisses and undreamed of patience and acceptance. I am truly blessed. It's done, guys, and now we're off to Disneyworld!
Kalen Delaney, 1999