Guru's Guide to SQL Server Architecture and Internals, The

Book description

"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

Table of contents

  1. Copyright
  2. List of Exercises
  3. Foreword
  4. Historical Perspective
  5. Preface
  6. Acknowledgments
  7. Introduction
  8. About the Author
  9. Foundations
    1. Overview
      1. Chapter Overview
      2. Chapter Pairs
      3. About the Code
    2. Windows Fundamentals
      1. The Win32 API
      2. User Mode vs. Kernel Mode
      3. Processes and Threads
      4. Virtual Memory vs. Physical Memory
      5. Subsystems
      6. Dynamic-Link Libraries
      7. Tools
      8. Recap
      9. Knowledge Measure
    3. Processes and Threads
      1. Processes
      2. Threads
      3. Thread Scheduling
      4. Thread Synchronization
    4. Memory Fundamentals
      1. Memory Basics
      2. Virtual Memory
      3. Heaps
      4. Shared Memory
    5. I/O Fundamentals
      1. I/O Basics
      2. Asynchronous and Nonbuffered I/O
      3. Scatter-Gather I/O
      4. I/O Completion Ports
      5. Memory-Mapped File I/O
    6. Networking Fundamentals
      1. Overview
      2. Named Pipes
      3. Windows Sockets
      4. Remote Procedure Call
      5. Recap
      6. Knowledge Measure
    7. COM
      1. Overview
      2. Before COM
      3. The Dawn of COM
      4. Basic Architecture
      5. COM at Work
      6. Threading Models
      7. COM and SQL Server
      8. Recap
      9. Knowledge Measure
    8. XML
      1. Overview
      2. Simplicity Comes at a Price
      3. A Brief History of XML
      4. XML vs. HTML: An Example
      5. Document Type Definitions
      6. XML Schemas
      7. Converting XML to HTML Using a Style Sheet
      8. The Document Object Model
      9. Processing XML with MSXML
      10. Resources
      11. Recap
      12. Knowledge Measure
  10. Subsystems, Components, and Technologies
    1. SQL Server as a Server
      1. SQL Server and Networking
      2. The SQL Server Executable
      3. SQL Server's DLLs
      4. SQL Server I/O
      5. SQL Server Components
      6. Recap
      7. Knowledge Measure
    2. User Mode Scheduler
      1. UMS Design Goals
      2. User Mode vs. Kernel Mode Scheduling
      3. Preemptive vs. Cooperative Tasking
      4. How UMS Takes Over Scheduling
      5. The UMS Scheduler
      6. The UMS Scheduler Lists
      7. Going Preemptive
      8. Hidden Schedulers
      9. DBCC SQLPERF(umsstats)
      10. Recap
      11. Knowledge Measure
    3. SQL Server Memory Management
      1. Memory Regions
      2. Sizing
      3. The BPool
      4. Primitive Allocations
      5. AWE
      6. The Lazywriter
      7. The Memory Managers
      8. Pulling It All Together
      9. Recap
      10. Knowledge Measure
    4. Query Processor
      1. Key Terms and Concepts
      2. Parsing
      3. Optimization Stages
      4. Optimization Limits
      5. Parameter Sniffing
      6. Auto-Parameterization
      7. Indexing
      8. Statistics
      9. Indexable Expressions
      10. Join Order and Type Selection
      11. Logical and Physical Operators
      12. Recap
      13. Knowledge Measure
    5. Transactions
      1. The ACID Test
      2. How SQL Server Transactions Work
      3. Types of Transactions
      4. Avoiding Transactions Altogether
      5. Automatic Transaction Management
      6. Transaction Isolation Levels
      7. Transaction Commands and Syntax
      8. Debugging Transactions
      9. Optimizing Transactional Code
      10. Recap
      11. Knowledge Measure
    6. Cursors
      1. Overview
      2. On Cursors and ISAM Databases
      3. Types of Cursors
      4. Appropriate Cursor Use
      5. Transact-SQL Cursor Syntax
      6. Configuring Cursors
      7. Updating Cursors
      8. Cursor Variables
      9. Cursor Stored Procedures
      10. Optimizing Cursor Performance
      11. Recap
      12. Knowledge Measure
    7. ODSOLE
      1. Overview
      2. The sp_OA Procedures
      3. Automating with ODSOLE
      4. Automating SQL-DMO by Using ODSOLE
      5. Using ODSOLE to Automate Custom Objects
      6. Recap
      7. Knowledge Measure
    8. Full-Text Search
      1. Overview
      2. Architectural Details
      3. Setting Up Full-Text Indexes
      4. Full-Text Predicates
      5. Rowset Functions
      6. Recap
      7. Knowledge Measure
  11. Data Services
    1. Server Federations
      1. Partitioned Views
      2. Recap
      3. Knowledge Measure
    2. SQLXML
      1. Overview
      2. MSXML
      3. FOR XML
      4. Using FOR XML
      5. OPENXML
      6. Using OPENXML
      7. Accessing SQL Server over HTTP
      8. URL Queries
      9. Using URL Queries
      10. Template Queries
      11. Mapping Schemas
      12. Updategrams
      13. XML Bulk Load
      14. Managed Classes
      15. SQLXML Web Service (SOAP) Support
      16. SQLXML Limitations
      17. Recap
      18. Knowledge Measure
    3. Notification Services
      1. How It Works
      2. Building Your Own Notification Application
      3. Recap
      4. Knowledge Measure
    4. Data Transformation Services
      1. Overview
      2. Packages
      3. The Multiphase Data Pump
      4. The Bulk Insert Task
      5. The Data Driven Query Task
      6. ActiveX Transformations
      7. Other Types of Transformations
      8. Lookup Queries
      9. Workflow Properties
      10. DTS and Transactions
      11. Controlling Package Workflow through Scripting
      12. Parameterized DTS Packages
      13. The DSO Rowset Provider
      14. Using DTS to Transform Replication Subscriptions
      15. Custom Tasks
      16. Controlling DTS through Automation
      17. Recap
      18. Knowledge Measure
    5. Snapshot Replication
      1. Overview
      2. The Snapshot Agent
      3. Duties of the Snapshot and Distribution Agents
      4. Updatable Subscriptions
      5. Remote Agent Activation
      6. Replication Cleanup
      7. Recap
      8. Knowledge Measure
    6. Transactional Replication
      1. Overview
      2. The MSrepl_commands Table
      3. The sp_replcmds Procedure
      4. The sp_repldone Procedure
      5. Update Stored Procedures
      6. Concurrent Snapshot Processing
      7. Updatable Subscriptions
      8. Validating Replicated Data
      9. Skipping Errors
      10. Cleanup
      11. Recap
      12. Knowledge Measure
    7. Merge Replication
      1. Overview
      2. Conflict Resolution
      3. Generations
      4. Filtering
      5. Identity Range Management
      6. Recap
      7. Knowledge Measure
  12. Undocumented SQL Server
    1. Finding Undocumented Features
      1. The syscomments Gold Mine
      2. Goodies in sysobjects
      3. Scripting Undocumented and System Objects
      4. The Profiler Treasure Trove
      5. Snooping around in the Installation Scripts
      6. DLL Imports
      7. Recap
      8. Knowledge Measure
    2. DTSDIAG
  13. Essays
    1. Why I Really, Really Don't Like Fish!
    2. Pseudo-Techie Tactics 101How to Make Yourself Appear to Be an Expert via Newsgroup Postings
    3. CD-ROM Warranty

Product information

  • Title: Guru's Guide to SQL Server Architecture and Internals, The
  • Author(s): Ken Henderson
  • Release date: October 2003
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780201700473