did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780735621978

Inside Microsoft SQL Server 2005 T-SQL Programming

by ;
  • ISBN13:

    9780735621978

  • ISBN10:

    0735621977

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2006-05-17
  • Publisher: Microsoft Press
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99

Summary

This thorough, hands-on reference for database developers and administrators delivers expert guidance on sophisticated uses of Transact-SQL (T-SQL)--one of the most familiar and powerful programming languages for SQL Server. Written by a T-SQL guru, this guide focuses on language features and how they are interpreted and processed by the SQL Server execution engine. You'll get in-depth coverage of the sophisticated uses of T-SQL, including triggers, user-defined functions, exception handling, and more. The book explains and compares solutions to database-development problems in both SQL Server 2000 and SQL Server 2005, discussing the new T-SQL programming features added to SQL Server 2005 in detail. Includes extensive code samples, table examples, and logic puzzles to help database developers and administrators understand the intricacies and help promote mastery of T-SQL.

Author Biography

Dejan Sarka is MCT and MCDBA certified and a Microsoft MVP for SQL Server. He teaches and consults for Solid Quality Mentors, speaks at TechEd and PASS, and develops OLTP, OLAP, and data mining solutions.

Table of Contents

Forewordp. xi
Prefacep. xiii
Acknowledgmentsp. xvii
Introductionp. xxi
Datatype-Related Problems, XML, and CLR UDTsp. 1
DATETIME Datatypesp. 2
Storage Format of DATETIMEp. 2
Datetime Manipulationp. 3
Datetime-Related Querying Problemsp. 8
Character-Related Problemsp. 25
Pattern Matchingp. 26
Case-Sensitive Filtersp. 31
Large Objectsp. 32
MAX Specifierp. 32
BULK Rowset Providerp. 34
Implicit Conversionsp. 36
Scalar Expressionsp. 36
Filter Expressionsp. 37
CLR-Based User-Defined Typesp. 40
Theoretical Introduction to UDTsp. 41
Programming a UDTp. 48
XML Data Typep. 65
XML Support in a Relational Databasep. 65
When Should You Use XML Instead of Relational Representation?p. 67
XML Serialized Objects in a Databasep. 68
Using XML with Open Schemap. 75
XML Data Type as a Parameter of a Stored Procedurep. 81
XQuery Modification Statementsp. 82
Conclusionp. 83
Temporary Tables and Table Variablesp. 85
Temporary Tablesp. 86
Local Temporary Tablesp. 86
Global Temporary Tablesp. 94
Table Variablesp. 96
Limitationsp. 96
tempdbp. 97
Scope and Visibilityp. 97
Transaction Contextp. 97
Statisticsp. 98
tempdb Considerationsp. 101
Table Expressionsp. 102
Comparison Summaryp. 103
Summary Exercise-Relational Divisionp. 104
Conclusionp. 109
Cursorsp. 111
Using Cursorsp. 112
Cursor Overheadp. 114
Dealing with Each Row Individuallyp. 115
Order-Based Accessp. 116
Custom Aggregatesp. 116
Running Aggregationsp. 118
Maximum Concurrent Sessionsp. 122
Matching Problemsp. 131
Conclusionp. 138
Dynamic SQLp. 139
EXECp. 141
A Simple EXEC Examplep. 141
EXEC Has No Interfacep. 142
Concatenating Variablesp. 145
EXEC ATp. 146
sp_executesqlp. 149
The sp_executesql Interfacep. 149
Statement Limitp. 152
Environmental Settingsp. 153
Uses of Dynamic SQLp. 153
Dynamic Maintenance Activitiesp. 153
Storing Computationsp. 156
Dynamic Filtersp. 160
Dynamic PIVOT/UNPIVOTp. 166
SQL Injectionp. 172
SQL Injection: Code Constructed Dynamically at Clientp. 172
SQL Injection: Code Constructed Dynamically at Serverp. 173
Protecting Against SQL Injectionp. 177
Conclusionp. 179
Viewsp. 181
What Are Views?p. 181
ORDER BY in a Viewp. 183
Refreshing Viewsp. 187
Modular Approachp. 189
Updating Viewsp. 198
View Optionsp. 202
ENCRYPTIONp. 202
SCHEMABINDINGp. 203
CHECK OPTIONp. 204
VIEW_METADATAp. 205
Indexed Viewsp. 206
Conclusionp. 211
User-Defined Functionsp. 213
Some Facts About UDFsp. 214
Scalar UDFsp. 214
T-SQL Scalar UDFsp. 215
Performance Issuesp. 217
UDFs Used in Constraintsp. 219
CLR Scalar UDFsp. 222
SQL Signaturep. 231
Table-Valued UDFsp. 239
Inline Table-Valued UDFsp. 239
Split Arrayp. 242
Multistatement Table-Valued UDFsp. 248
Per-Row UDFsp. 252
Conclusionp. 255
Stored Proceduresp. 257
Types of Stored Proceduresp. 258
User-Defined Stored Proceduresp. 258
Special Stored Proceduresp. 262
System Stored Proceduresp. 264
Other Types of Stored Proceduresp. 266
The Stored Procedure Interfacep. 267
Input Parametersp. 267
Output Parametersp. 269
Resolutionp. 273
Compilations, Recompilations, and Reuse of Execution Plansp. 275
Reuse of Execution Plansp. 275
Recompilationsp. 281
Parameter Sniffing Problemp. 284
EXECUTE ASp. 288
Parameterizing Sort Orderp. 289
Dynamic Pivotp. 294
CLR Stored Proceduresp. 305
Conclusionp. 313
Triggersp. 315
AFTER Triggersp. 316
The inserted and deleted Special Tablesp. 316
Identifying the Number of Affected Rowsp. 318
Identifying the Type of Triggerp. 321
Not Firing Triggers for Specific Statementsp. 324
Nesting and Recursionp. 328
UPDATE and COLUMNS_UPDATEDp. 329
Auditing Examplep. 333
INSTEAD OF Triggersp. 335
Per-Row Triggersp. 336
Used with Viewsp. 339
Automatic Handling of Sequencesp. 342
DDL Triggersp. 344
Database-Level Triggersp. 346
Server-Level Triggersp. 350
CLR Triggersp. 351
Conclusionp. 360
Transactionsp. 361
What Are Transactions?p. 362
Locksp. 364
Isolation Levelsp. 370
Read Uncommittedp. 371
Read Committedp. 372
Repeatable Readp. 373
Serializablep. 374
New Isolation Levelsp. 375
Save Pointsp. 381
Deadlocksp. 383
Simple Deadlock Examplep. 384
Deadlock Caused by Missing Indexesp. 385
Deadlock with a Single Tablep. 388
Conclusionp. 390
Exception Handlingp. 391
Exception Handling prior to SQL Server 2005p. 391
Exception Handling in SQL Server 2005p. 395
TRY/CATCHp. 395
New Exception-Handling Functionsp. 396
Errors in Transactionsp. 399
Conclusionp. 409
Service Brokerp. 411
Dialog Conversationsp. 411
Conversationsp. 412
Messagesp. 415
Contractsp. 417
DEFAULTp. 418
Queuesp. 418
Servicesp. 423
Begining and Ending Dialogsp. 424
Conversation Endpointsp. 426
Conversation Groupsp. 428
Sending and Receivingp. 430
Sample Dialogp. 434
Poison Messagesp. 442
Dialog Securityp. 443
Asymmetric Key Authenticationp. 444
Configuring Dialog Securityp. 445
Routing and Distributionp. 448
Adjacent Broker Protocolp. 449
Service Broker Endpointsp. 450
Routesp. 455
Scenariosp. 460
Reliable SOAp. 460
Asynchronous Processingp. 461
Where Does Service Broker Fit?p. 462
What Service Broker Isp. 462
What Service Broker Isn'tp. 462
Service Broker and MSMQp. 462
Service Broker and BizTalkp. 463
Service Broker and Windows Communication Foundationp. 463
Conclusionp. 464
Companion to CLR Routinesp. 465
Create the CLRUtilities Database: SQL Serverp. 466
Development: Visual Studiop. 466
Deployment and Testing: Visual Studio and SQL Serverp. 467
Indexp. 491
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program