Preface

You don’t have to be an experienced SQL Server 2005 programmer to use this book; it is designed for users of all levels. You also do not need any experience with SQL Server 2000, as programming SQL Server 2005 is different in nearly every way from programming SQL Server 2000. You do need an understanding of fundamental relational database concepts. Basic knowledge of T-SQL also helps.

The goal of this book is to introduce all facets of programming SQL Server 2005 to developers. This book can be used either as a primer by developers with little or no experience with SQL Server, as a ramp-up to the new programming models for SQL Server 2005 for more experienced SQL Server developers, or as background and primer to specific concepts.

The code in this book is available for download on the O’Reilly web site (http://www.oreilly.com/catalog/progsqlsvr), so you don’t need to retype it to follow the examples. Only code that is important to illustrate specific concepts is listed in this book, but enough code is presented to let you use the book without loading the actual code. The book does not list user interface code or code generated automatically by Visual Studio .NET.

What You Need to Use This Book

To run the samples in this book, you need a computer running Windows 2000 SP4 or later, Microsoft .NET Framework 2.0 (installed with SQL Server 2005), and SQL Server 2005—Developer, Standard, or Enterprise Edition.

Most of the examples in this book use C# code and Visual Studio 2005. It is easiest to use Visual Studio 2005 to compile and execute the examples in the book. However, you can compile the samples in this book by using the C# command-line compiler (csc.exe) included with the .NET Framework.

Some of the examples in this book require the AdventureWorks sample database, which ships with SQL Server 2005 but is not installed automatically. Follow the product documentation to install the AdventureWorks database during the SQL Server 2005 installation or to install it in an existing installation. Other examples in this book require a database called ProgrammingSqlServer2005 that you should create—this new database is used to minimize the impact of the examples on the AdventureWorks database installation.

Conventions Used in This Book

The following typographical conventions are used in this book:

Plain text

Indicates menu titles, menu options, menu buttons, and keyboard accelerators (such as Alt and Ctrl)

Italic

Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities

Constant width

Indicates commands, options, switches, variables, attributes, keys, functions, types, classes, namespaces, methods, modules, properties, parameters, values, objects, events, event handlers, XML tags, HTML tags, macros, databases, the contents of files, or the output from commands

Constant width italic

Shows text that should be replaced with user-supplied values

Code

Indicates source code—either C# or T-SQL

Tip

This icon signifies a tip, suggestion, or general note.

Warning

This icon indicates a warning or caution.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international or local)
(707) 829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://www.oreilly.com/catalog/progsqlsvr

To comment or ask technical questions about this book, send email to:

For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our web site at:

http://www.oreilly.com

Safari® Enabled

When you see a Safari® Enabled icon on the cover of your favorite technology book, that means the book is available online through the O’Reilly Network Safari Bookshelf.

Safari offers a solution that’s better than e-books. It’s a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at http://safari.oreilly.com.

Acknowledgments

This book wouldn’t have been possible without the help of many people. I’d like to thank my editors Jeff Pepper, Ralph Davis, and Jonathan Gennick for making this book better. Thanks to reviewers Louis Davidson, Vyas Kondreddi, Deac Lancaster, Alex Lim, and Josh Sackett for providing valuable technical feedback. I’d like to thank the production team—Adam Witwer, Nancy Kotari, and Bill McManus—for putting everything together. I’d also like to thank Jan Shanahan at Microsoft for promptly and patiently answering questions while SQL Server 2005 evolved. Of course, none of this would be necessary without the SQL Server 2005 team at Microsoft—you built a great piece of software. Finally, thank you, Molly, my friends, and my family—you are what matter most.

Get Programming SQL Server 2005 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.