The Guru's Guide to SQL Server Architecture and Internals
  • Alternative view 1 of The Guru's Guide to SQL Server Architecture and Internals
  • Alternative view 2 of The Guru's Guide to SQL Server Architecture and Internals

The Guru's Guide to SQL Server Architecture and Internals

5.0 3
by Ken Henderson
     
 

ISBN-10: 0201700476

ISBN-13: 9780201700473

Pub. Date: 10/24/2003

Publisher: Addison-Wesley

"I can pretty much guarantee that anyone who uses SQL Server on a regular basis (even those located in Redmond working on SQL Server) can learn something new from reading this book."
--David Campbell, Product Unit Manager,
Relational Server Team, Microsoft Corporation

The latest book from the highly regarded and best-selling author Ken Henderson,

Overview

"I can pretty much guarantee that anyone who uses SQL Server on a regular basis (even those located in Redmond working on SQL Server) can learn something new from reading this book."
--David Campbell, Product Unit Manager,
Relational Server Team, Microsoft Corporation

The latest book from the highly regarded and best-selling author Ken Henderson, The Guru's Guide to SQL Server Architecture and Internals is the consummate reference to Microsoft SQL Server. Picking up where documentation and white papers leave off, this book takes an all-inclusive approach to provide the most depth and breadth of coverage of any book on SQL Server architecture, internals, and tuning.

Blending in-depth discussion with practical application, the guide begins with several chapters on the fundamental Windows technologies behind SQL Server, including processes and threads, memory management, Windows I/O, and networking. The focus then moves on to the architectural details of SQL Server and how to practically apply them.

The entire SQL Server product is covered--not just the functionality that resides within the core executable or product features that have been in place for years. SQL Server has matured and broadened substantially with each release, and the author explores the "fringe" technologies that have yet to be covered elsewhere, including Notification Services, Full Text Search, SQLXML, replication, DTS, and a host of others.

Throughout the book, the author uses WinDbg, Microsoft's free downloadable symbolic debugger, to look under the hood of SQL Server. Armed with new debugging and coding skills, readers will be ready to master SQL Server on their own.

The accompanying CD-ROM is packed with additional material, including full source code for the book's 900+ examples, as well as three invaluable tools: DTSDIAG, the VBODSOLE Library, and DTS Package Guru. DTSDIAG allows developers and administrators to simultaneously collect Profiler traces, perform logs, blocking script output, system event logs, and SQLDIAG reports from a specified SQL Server. The VBODSOLE Library features more than twenty new COM-based functions for Transact-SQL, including T-SQL enhancements such as array-manipulation routines, financial functions, string-manipulation functions, and system functions. DTS Package Guru is a .NET-based package editor for SQL Server's Data Transformation Services that allows editing of any modifiable package and supports the automation of mass package changes.

The Guru's Guide to SQL Server Architecture and Internals is the essential guide for database developers and admin- istrators alike, regardless of skill level.

0201700476B10012003

Product Details

ISBN-13:
9780201700473
Publisher:
Addison-Wesley
Publication date:
10/24/2003
Pages:
1021
Product dimensions:
7.00(w) x 9.10(h) x 2.00(d)

Table of Contents

List of Exercises.

Foreword.

Historical Perspective.

Preface.

Acknowledgments.

Introduction.

About the Author.

I. FOUNDATIONS.

1. Overview.

Chapter Overview.

Chapter Pairs.

About the Code.

2. Windows Fundamentals.

The Win32 API.

User Mode vs. Kernel Mode.

Processes and Threads.

Virtual Memory vs. Physical Memory.

Subsystems.

Dynamic-Link Libraries.

Tools.

Recap.

Knowledge Measure.

3. Processes and Threads.

Processes.

Threads.

Thread Scheduling.

Thread Synchronization.

4. Memory Fundamentals.

Memory Basics.

Virtual Memory.

Heaps.

Shared Memory.

5. I/O Fundamentals.

I/O Basics.

Asynchronous and Nonbuffered I/O.

Scatter-Gather I/O.

I/O Completion Ports.

Memory-Mapped File I/O.

6. Networking Fundamentals.

Overview.

Named Pipes.

Windows Sockets.

Remote Procedure Call.

Recap.

Knowledge Measure.

7. COM.

Overview.

Before COM.

The Dawn of COM.

Basic Architecture.

COM at Work.

Threading Models.

COM and SQL Server.

Recap.

Knowledge Measure.

8. XML.

Overview.

Simplicity Comes at a Price.

A Brief History of XML.

XML vs. HTML: An Example.

Document Type Definitions.

XML Schemas.

Converting XML to HTML Using a Style Sheet.

The Document Object Model.

Processing XML with MSXML.

Resources.

Recap.

Knowledge Measure.

II. SUBSYSTEMS, COMPONENTS, AND TECHNOLOGIES.

9. SQL Server as a Server.

SQL Server and Networking.

The SQL Server Executable.

SQL Server's DLLs.

SQL Server I/O.

SQL Server Components.

Recap.

Knowledge Measure.

10. User Mode Scheduler.

UMS Design Goals.

User Mode vs. Kernel Mode Scheduling.

Preemptive vs. Cooperative Tasking.

How UMS Takes Over Scheduling.

The UMS Scheduler.

The UMS Scheduler Lists.

Going Preemptive.

Hidden Schedulers.

DBCC SQLPERF(umsstats).

Recap.

Knowledge Measure.

11. SQL Server Memory Management.

Memory Regions.

Sizing.

The BPool.

Primitive Allocations.

AWE.

The Lazywriter.

The Memory Managers.

Pulling It All Together.

Recap.

Knowledge Measure.

12. Query Processor.

Key Terms and Concepts.

Parsing.

Optimization Stages.

Optimization Limits.

Parameter Sniffing.

Auto-Parameterization.

Indexing.

Statistics.

Indexable Expressions.

Join Order and Type Selection.

Logical and Physical Operators.

Recap.

Knowledge Measure.

13. Transactions.

The ACID Test.

How SQL Server Transactions Work.

Types of Transactions.

Avoiding Transactions Altogether.

Automatic Transaction Management.

Transaction Isolation Levels.

Transaction Commands and Syntax.

Debugging Transactions.

Optimizing Transactional Code.

Recap.

Knowledge Measure.

14. Cursors.

Overview.

On Cursors and ISAM Databases.

Types of Cursors.

Appropriate Cursor Use.

Transact-SQL Cursor Syntax.

Configuring Cursors.

Updating Cursors.

Cursor Variables.

Cursor Stored Procedures.

Optimizing Cursor Performance.

Recap.

Knowledge Measure.

15. ODSOLE.

Overview.

The sp_OA Procedures.

Automating with ODSOLE.

Automating SQL-DMO by Using ODSOLE.

Using ODSOLE to Automate Custom Objects.

Recap.

Knowledge Measure.

16. Full-Text Search.

Overview.

Architectural Details.

Setting Up Full-Text Indexes.

Full-Text Predicates.

Rowset Functions.

Recap.

Knowledge Measure.

III. DATA SERVICES.

17. Server Federations.

Partitioned Views.

Recap.

Knowledge Measure.

18. SQLXML.

Overview.

MSXML.

FOR XML.

Using FOR XML.

OPENXML.

Using OPENXML.

Accessing SQL Server over HTTP.

URL Queries.

Using URL Queries.

Template Queries.

Mapping Schemas.

Updategrams.

XML Bulk Load.

Managed Classes.

SQLXML Web Service (SOAP) Support.

SQLXML Limitations.

Recap. Knowledge Measure.

19. Notification Services.

How It Works.

Building Your Own Notification Application.

Recap.

Knowledge Measure.

20. Data Transformation Services.

Overview.

Packages.

The Multiphase Data Pump.

The Bulk Insert Task.

The Data Driven Query Task.

ActiveX Transformations.

Other Types of Transformations.

Lookup Queries.

Workflow Properties.

DTS and Transactions.

Controlling Package Workflow through Scripting.

Parameterized DTS Packages.

The DSO Rowset Provider.

Using DTS to Transform Replication Subscriptions.

Custom Tasks.

Controlling DTS through Automation.

Recap.

Knowledge Measure.

21. Snapshot Replication.

Overview.

The Snapshot Agent.

Duties of the Snapshot and Distribution Agents.

Updatable Subscriptions.

Remote Agent Activation.

Replication Cleanup.

Recap.

Knowledge Measure.

22. Transactional Replication.

Overview.

The MSrepl_commands Table.

The sp_replcmds Procedure.

The sp_repldone Procedure.

Update Stored Procedures.

Concurrent Snapshot Processing.

Updatable Subscriptions.

Validating Replicated Data.

Skipping Errors.

Cleanup.

Recap.

Knowledge Measure.

23. Merge Replication.

Overview.

Conflict Resolution.

Generations.

Filtering.

Identity Range Management.

Recap.

Knowledge Measure.

IV. UNDOCUMENTED SQL SERVER.

24. Finding Undocumented Features.

The syscomments Gold Mine.

Goodies in sysobjects.

Scripting Undocumented and System Objects.

The Profiler Treasure Trove.

Snooping around in the Installation Scripts.

DLL Imports.

Recap.

Knowledge Measure.

25. DTSDIAG.

V. ESSAYS.

Why I Really, Really Don't Like Fish!

Pseudo-Techie Tactics 101.

Index. 0201700476T10012003

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

The Guru's Guide to SQL Server Architecture and Internals 5 out of 5 based on 0 ratings. 3 reviews.
Anonymous More than 1 year ago
Guest More than 1 year ago
own all three of Ken Henderson's SQL Server books. They stand apart from the rest of the crowd as the best books available on their respective subjects. Henderson takes a fresh approach to teaching that other authors would do well to emulate. What do I mean exactly? I mean this: Every point of any significance that is raised is illustrated with code when possible. There are hundreds of code examples in each of Henderson's books - many times what you usually see in DBA or programming books. No details are glosssed over. If you really want to know how something works or what the best approach is to doing something, you need these books. Another thing that is great about these books is how easy to read they are. Complex subjects are regularly broached with explanations and teaching that practically anyone could understand. Topics that trip up other authors or that they skip altogether are discussed in terms that anyone can grasp. It is difficult to convey just how important this is, but suffice it to say that the books are simply easy to read. If you want to know SQL Server at an expert level, you need look no further. Get all three of Henderson's books and read them cover-to-cover.
Guest More than 1 year ago
Microsoft's SQL Server does not have all the functionality of Oracle or IBM's databases. But Microsoft has put a huge amount of work into beefing it up, as shown in this book. Henderson has done far more than just write a straightforward guide to the query syntax. In fact, the latter is not the emphasis here. Rather, he explains how SQL Server integrates into the Microsoft operating system, for one thing. Like memory mapped files, WinSock and network connections, and how they relate to SQL Server. He provides a long discussion of its memory management; crucial if you are heavily loading up the database. With queries and table joins, you get help on how to optimise, based on knowledge of SQL Server's innards. At over 900 pages, the breadth might seem daunting. But it reflects the complexity and potential of SQL Server. Henderson also provides some nice extra touches. Each chapter ends in a quick list of review questions, to see if you have been paying attention. Plus, at the book's end, he has 2 essays. One is on the drivel that constitutes most [all?] management fads. The second is on pseudo experts in newsgroups. The entire book is worth it, just for these essays! Very biting.