Brown offers realistic insight into every significant aspect of SQL Server 2005: its new features, architecture, administrative tools, security model, data management capabilities, devel
Trang 1By Eric L Brown
Publisher: Addison Wesley Professional Pub Date: March 20, 2006
Print ISBN-10: 0-321-34979-2 Print ISBN-13: 978-0-321-34979-8 Pages: 336
Table of Contents | Index
Need to get your arms around Microsoft SQL Server 2005 fast, without getting buried in the details? Need to make fundamental decisions about deploying, using, or administering Microsoft's latest enterprise database?
Need to understand what's new in SQL Server 2005, and how it fits with your existing IT and business infrastructure? SQL Server 2005 Distilled delivers the answers you
needquickly, clearly, and objectively.
Former SQL Server team member Eric L Brown offers realistic insight into every
significant aspect of SQL Server 2005: its new features, architecture, administrative tools, security model, data management capabilities, development environment, and much more Brown draws on his extensive experience consulting with enterprise users, outlining realistic usage scenarios that leverage SQL Server 2005's strengths and minimize its limitations Coverage includes
Architectural overview: how SQL Server 2005's features work together and what it means to you
Security management, policies, and permissions: gaining tighter control over your data
SQL Server Management Studio: Microsoft's new, unified tool suite for authoring, management, and operations
Availability enhancements: online restoration, improved replication, shorter
maintenance/recovery windows, and more
Scalability improvements, including a practical explanation of SQL Server 2005's complex table partitioning feature
Trang 2SQL Server 2005's built-in NET CLR: how to use it, when to use it, and when to stay with T-SQL
Business Intelligence Development Studio: leveraging major improvements in
reporting and analytics
Visual Studio integration: improving efficiency throughout the coding and debugging process
Simple code examples demonstrating SQL Server 2005's most significant new
features
Trang 3By Eric L Brown
Publisher: Addison Wesley Professional Pub Date: March 20, 2006
Print ISBN-10: 0-321-34979-2 Print ISBN-13: 978-0-321-34979-8 Pages: 336
Trang 5Index
Trang 6Many of the designations used by manufacturers and sellers todistinguish their products are claimed as trademarks Wherethose designations appear in this book, and the publisher wasaware of a trademark claim, the designations have been printedwith initial capital letters or in all capitals
The author and publisher have taken care in the preparation ofthis book, but make no expressed or implied warranty of anykind and assume no responsibility for errors or omissions Noliability is assumed for incidental or consequential damages inconnection with or arising out of the use of the information orprograms contained herein
The publisher offers excellent discounts on this book when
ordered in quantity for bulk purchases or special sales, whichmay include electronic versions and/or custom covers and
content particular to your business, training goals, marketingfocus, and branding interests For more information, please
Trang 8commercially available code This series should be an invaluableresource for any IT professional or student working in today'sWindows environment
Trang 10For more information please go to
www.awprofessional.com/msserverseries
Trang 11This book does not cover the entirety of SQL Server 2005 Itdoesn't include any fancy sample applications or tons of code.This book is about features It is about understanding what themajor features of SQL Server 2005 are designed to do I strove
to include an architectural discussion, usage scenarios, and
interesting information about using the technology I offer someopinions about how I'd expect a customer to really use a
cases, I try to offer a suggested "reality" usage based on
customers' feedback about their experience with the product.The goal is to get you, the reader, up to speed on the "whats"and "hows" of SQL Server 2005 Chapter 6, "The Code
Chapter," is the only chapter that includes any amount of code,and that code exercises the features in a simple manner,
providing the nuts and bolts of the technique I'll leave the
creative and advanced techniques to the huge doorstop booksthat cover SQL Server 2005 in every detail
Trang 12If you're an IT professional who has to deal with databases onany level, this book is a great foundation for getting to knowSQL Server 2005 Many books today are too intimidating; theystart with an application and spend literally hundreds of pagesexercising that code Often they do this without so much as abreath about how the code fits into the bigger picture This
book is different in this way: You get to know many featureswithout getting mucked up in deep details, and you see how thefeatures fit together I cover each topic individually, meaningthat you could read any chapter on its own You can keep thebook as a reference Or you might use this book as an "airplaneread" that helps refresh your conceptual knowledge of SQL
Server 2005 That's the goal of this book: You can read it asneeded, without worrying about too much minutia or too manycode samples
Trang 13
This book is singular in that it's meant for technology decisionmakers, not hardcore developers or database administrators.(However, this would still be a good read for them, because itcan be used to guide other learning about SQL Server 2005.)The technology decision maker will find the book invaluable,because you don't want to be caught at a cocktail party withyour peers not knowing what the unified dimension model is
Trang 14
Chapter 1, "Introduction to SQL Server 2005," is an overview ofthe entire productespecially the new features across the OLTPand OLAP sides of SQL Server 2005 I cover all the basics ofwhat's new and, as such, what should work for everybody
Chapter 2, "What Everyone Should Know About Security,"
provides an overview of what has unfortunately become one ofthe most important issues in database technology The securityprofessional is the most obvious target for Chapter 2, but giventhe importance of security these days, everyone can benefitfrom reading it The goal of Chapter 2 is to bring you up to
speed on the essential security features Chapters 3 and 4 focus
on two particular audiences: the database administrator and thedatabase developer Chapter 3, "Enterprise Data Management,"covers all the new aspects of database administration in SQLServer 2005 Chapter 4, "Features for Database Development,"covers the features of SQL Server 2005 that are relevant to
database application development Chapter 5, "Overview of
Business Intelligence," is about how Microsoft is both catching
up and innovating in the reporting and analytics space It is not
an OLAP concept primer; I assume you know what dimensionsand cubes are If you don't, please see SQL Server Books
Online Chapter 6, "The Code Chapter," is all code I decided tohave a dedicated code chapter because I hate having to scanhundreds of pages to find the one line of code I'm looking for.This chapter isn't and can't be all-inclusive I simply cover thebasics and assume you'll read the other excellent Addison-
Wesley books on SQL Server 2005 My goal is to show you howeasy (as in the case of new security features) or how hard (as
in the table partitioning capabilities) using SQL Server 2005 canbe
Trang 15
Trying to decide who should be acknowledged and for what isdifficult I'd like to thank my spouse, Kim Kim is a writer whoknows the ups and downs of the trade well Her support haskept me going through system crashes and a lack of word flow.Her most important words were "Keep at it; it's a process." Iappreciate the patience of my daughters, Hannah and Chloe, asthey dealt with a dad who is "always at his computer." In terms
of technical help, a number of people at Microsoft are on myside: Thomas Rizzo, Kirsten Ward, Matt Nunn, Mark Wistrom,Willis Johnson, Donald Farmer, Kamal Hathi, and many more.I'd also like to thank my technical reviewers, whose fresh eyesmade the quality all that much better: Paul Irvine, Glenn Berry,and Mitch Gatchalian
It goes without saying that Elizabeth Peterson and Jana Jones
at Addison-Wesley have been patient Just one more day, andone more instant messenger sessionplease
Trang 16
My first experience with computers was in 1973 in second
grade, in a small-town school on Long Island I still rememberthe ratta-tat-tat of the Teletype onto giant rolls of gray paper.Wow!
It wasn't until high school that I found computers again, thistime in the form of the Commodore Pet It was early
programming: BASIC and FORTRAN I wasn't sure if computerswould work out Slowly, personal computing emerged, and bythe late '80s I was an information workeras a college student
My college education was in philosophy and communicationstudies, which may seem at odds with computing but are not.Philosophy is about logic and abstraction, and communication isabout input and output
My professional computing work began in earnest in 1996 when
I began work at Multiple Zones International as a product
manager While there I realized the next big wave was the
Internet, and I raced to get a job at a dot-com I worked forthree dot-coms before ending up on the SQL Server ProductTeam at Microsoft Of my dot-com days, we did
implementations of SAP, Great Plains, and early main frameintegration with e-commerce At one point in my early DB
years, we cut the edge of SQL Server capabilities by owning a500GB data warehouse running SQL Server 7 and 2000 In thethree years I was on the team, I ran "Yukon" readiness I have
written a column for SQL Server Magazine, and I have written extensively about SQL Server for MSDN Magazine and MSDN
online library
Since leaving Microsoft officially, I have worked on this bookand started an e-commerce hosting company I am now
working for Quilogy as a senior consultant on the Business
Intelligence National Practice
Trang 17If you want to ask me a question or comment about the book,please e-mail me at eric@aboutsqlserver.com.
Trang 182005
SQL Server 2005 was the most-awaited release of Microsoft'sSQL Server product line After millions of e-mails, hundreds ofspecifications, and dozens of builds, SQL Server 2005 promises
based database applications This book is a guided tour of theessential new features of the entire SQL Server 2005 product Itcovers the Online Transaction Processing (OLTP) technologies aswell as the Online Analytical Processing (OLAP) technologies,and almost everything in between Microsoft left no part of itsflagship database product untouched More than five years inthe making, SQL Server 2005 is a completely different
to be the most dramatic new database platform for Windows-technology than its predecessors This book covers the majorfeatures across the entire product This chapter covers only part
of what's new in SQL Server 2005 I'll try to distill the best andmost interesting features while providing some insight into howthe feature or technology was intended to be used Topics
include a bit of history about the evolution of the SQL ServerEngine, the various editions of SQL Server 2005, scalability,availability, maintaining large databases, and business
intelligence (BI)
This book is organized not simply around technologies, but
around the people who use the features My intention is to
provide a means for thinking about SQL Server in terms of bothapplication scenarios and day-to-day tasks That said, from afeature point of view, SQL Server 2005 provides the following:
Database engine enhancements SQL Server 2005
introduces many improvements and new features to thedatabase engine These improvements and features includeintegrating with the Microsoft NET Framework, new XML
Trang 19Management tools SQL Server 2005 introduces an
integrated suite of management tools and managementAPIs to provide ease of use, manageability, and support foroperations of large-scale SQL Server deployments
Data Transformation Services (DTS) enhancements.
DTS for SQL Server 2005 introduces a complete redesign,providing a comprehensive enterprise extraction,
transformation, and loading (ETL) platform It's even beenrenamed SQL Server Integration Services
of data warehousing, business intelligence, and line of
business solutions
Reporting Services SQL Sever 2005 Reporting Services is
a new report server and tool set for building, managing,and deploying enterprise reports Reporting Services allowsbusinesses to easily integrate business data from
heterogeneous data sources and data warehouses into rich,interactive, managed reports that can be browsed and
navigated over intranets, extranets, and the Internet
Trang 20a platform that helps you develop centralized notificationapplications and deploy these applications on a large scale.Notification Services lets businesses build rich notificationapplications that deliver personalized and timely
information, such as stock market alerts, news
subscriptions, package-delivery alerts, and airline ticketprices, to any device and to millions of subscribers
Note
From a version point of view, SQL Server 2005 is
SQL Server 9
Where do you get started with a product that has thousands ofnew features? This may be the hardest question for you as areader, for me as a writer, and for those actually using SQLServer 2005 The best answer may be where the greatest need
to know lies I always like to start with my favorite things, solet's begin by looking at the features found in the SQL ServerEngine
Trang 21grained access control, and separation of users and schema as well as database encryption.
Security is enhanced with features such as all permissions grantable, fine-Very Large Database (VLDB) availability is improved through online
indexing operations, fast recovery during redo operations, and partial availability during restore operations In addition, when using Windows
2003 Server, support for dynamic Address Windowing Extensions (AWE) memory management and hot-add memory is also introduced.
SQL Server improves the scalability and performance of database systems Data partitioning is enhanced with native table and indexing partitions, enabling horizontal data scale-out solutions In addition, application
concurrency is increased with a new snapshot isolation level and multiple active result sets.
SQL Server 2005 introduces the capability to develop database objects in NET languages using the NET Framework 2.0 Procedural objects,
including functions and triggers, can be written in languages such as C# and VB.NET In addition, the Transact-SQL language continues to be
improved with new ANSI-99 SQL language features.
XML is an important and widely accepted standard for disseminating data between different applications over local networks and the Internet SQL Server 2005 supports storing XML documents via a new XML data type and enhancements including Native XML Web Services support.
SQL Server 2005 provides enhancements to collation, character support, and global deployment Support for complex script, bidirectionality,
surrogate characters, and GB18030 is added to the relational database engine and user interfaces.
Trang 22SQL Server 2005 ships with significant enhancements to thecore database engine architecture These changes reflect
increased needs by customers for greater performance
scalability as well as support for decision support systemsin
both relational and data warehousing models One topic that isalways brought up at database application architecture
meetings is scale-up versus scale-out Scale-up is defined as asingle computer with its maximum capacity for hardware: RAM,hard drives, processors, and more Scale-out is defined as
breaking a large database into smaller, more manageable piecesand dividing the workload between multiple servers In practice,most Microsoft customers prefer scale-up It makes it easier toadd CPUs to servers and requires less operator intervention andfewer physical resources to manage From a theoretical
standpoint, scale-up should deliver appropriate performance forapplications, depending on the quality of code in the
application
SQL Server 2005 comes in several flavors Microsoft has pushedmost of the new high-availability features into Enterprise Edition(EE) while keeping the price of Standard Edition competitive.The Microsoft Desktop Engine (MSDE) engine has been replacedwith SQL Server Express Express is designed to be competitivewith other free databases, such as MySQL Microsoft has
introduced a low-end pay-for-database edition called
Workgroup Designed for small businesses, it removes ExpressEdition's limitation on database size and adds some better
administration technologies All the various versions use thesame database and query formats so that upgrading from
Express to Workgroup to Standard to Enterprise Edition
happens seamlessly
Trang 23Standard Editions
One of the most basic questions is which version of SQL Serveryou need This section answers this question The issue comesdown to Standard Edition versus Enterprise Edition In previousversions of SQL Server, Standard Edition was different fromEnterprise Edition only in the level of high-availability features.Some would say that you paid a "high-availability" tax Well,that has changed SQL Server Standard Edition includes all thekey high-availability features, and some new features such asdatabase mirroringwith some exceptions Microsoft draws theline between Standard and Enterprise in the completeness ofcoverage around specific highly sought-after features For
instance, only Enterprise Edition's database mirroring includesthe automatic redirect technology Good programmers should
be able to work around that issue You'll find that a number oftechnologies in SQL Server Enterprise Edition are strangely thatway The real difference between Standard and Enterprise
Edition is visible in scalability Standard Edition supports onlyfour CPUs Although Enterprise Edition isn't limited per se,
Windows Server 2003 Datacenter Edition and later support 64processors Thus, SQL Server 2005 is constrained to 64
processors Interestingly, both Standard and Enterprise Editioncome in 64-bit editions, meaning that deciding between 64-bitand 32-bit is more difficult Of course, the reality of financesmeans that the selection of core CPU technology is limited tobudget Microsoft has always been good about one thing: Themigration path from the entry-level products to Enterprise
Edition is a straight one The same on-disk formats and
programming features are available across the product editions.Microsoft introduced a new version late in the SQL Server 2000release cycle called Workgroup Edition
SQL Server Workgroup Edition
Trang 24somewhere between standard Edition and Express Edition Ithas more CPU capability It supports two CPUs and up to 3GB ofRAM Workgroup Edition also has no database size limit Butwho are the customers for Workgroup Edition? If your company
is big enough that it can afford a database, but it can't affordStandard Edition, Workgroup Edition is for you From a featurepoint of view, Workgroup aligns more closely with StandardEdition If you're a hobbyist or a beginning database
programmer, SQL Server Express may be your choice
SQL Server Express
Microsoft has introduced a replacement for MSDE called SQLServer Express SQL Server Express has all the best features of
a free database It's small, easy to install, and has decent
management tools It is throttled in capacity and concurrentworkload scalability SQL Server Express uses the same reliableand high-performance database engine as the other versions ofSQL Server 2005 It also uses the same data-access APIs, such
as ADO.NET, SQL Native Client, and Transact-SQL
SQL Server Express scenarios include the following:
As a web store, SQL Server Express, like its competition,MySQL, provides a rich data store for small client/server-type applications, such as those found all over the Internet
SQL Server Express can be a great local data store for
applications not designed for client/server-type
applications; think replacement for Access and MSDE
SQL Server Express limitations include the following:
Trang 25most situations, one CPU is sufficient
1GB of RAM This is for the buffer pool, which contains
data pages and such The server can take more than 1GB.Windows features such as AWE are not supported
4GB database This means that the data file, not the log
file, is limited Also, this is per database, not per server
SQL Server Express is part of the Express products that haveemerged from Microsoft SQL Server Express ships with VisualStudio Express and Visual Studio Web Express SQL Expressrequires the NET Framework 2.0 but doesn't come with it aspart of the installer You need to install the NET Framework 2.0before you install SQL Express To learn more about SQL ServerExpress, see Chapter 4, "Features for Database Development."
SQL Server Mobile Edition
First shipped with SQL Server 2000, SQL Server Mobile Edition,also known as SQL Server Compact Edition (SSCE), is the
Pocket PC database for connecting to enterprise database
systems SQL Server Mobile Edition is found in embedded
Pocket PC devices such as those found in inventory
management systems It's also found in systems where a localcopy of a subset of the data is provided to a Pocket PC device orsmart device
The benefits of SQL Server Mobile Edition are many:
You can create a SQL Server Mobile Edition database on thedesktop or on the device directly from SQL Server
Management Studio
Trang 26Studio into a SQL Server Mobile Edition database on eitherthe desktop or the device
You can run queries through Management Studio that target
a SQL Server Mobile Edition database on the device or thedesktop You can take advantage of new SQL Server MobileEdition features that include an XML show plan rendered in
a GUI format just like native SQL Server You can also takeadvantage of the capability to use query hints to overridethe query optimizer
SQL Server Mobile Edition also takes direct advantage ofnew merge replication performance improvements that
greatly increase a single server's scalability with thousands
of simultaneously connected SQL Server Mobile Edition
subscription databases
SQL Server Mobile Edition isn't covered in this book Managingthe Mobile database is discussed in Chapter 3, "Enterprise DataManagement."
SQL Server 2000 64-Bit Review
SQL Server 2000 shipped a 64-bit Enterprise Edition in 2003.This release was in response to pressure derived from customerworkloads In simpler terms, customers were clamoring for
scalability increases for memory-intensive workloads Becausescale-out wasn't possible, Microsoft needed a scale-up capabilitythat was less restricted than current 32-bit Microsoft operatingsystems (OSs) From an architectural point of view, SQL Server
2000 64-bit is the same as SQL Server 2000 32-bit The 64-bitversion was mostly a core engine upgrade that worked
seamlessly, because the original algorithms were designed for
Trang 27to prove SQL Server's performance capability There are somecaveats Only the core engine technology was supported in the64-bit edition This meant that Data Transformation Services,Notification Services, and Analysis Services were not 64-bit
operating system- or database-capable Although you couldmanage the 64-bit database from the Enterprise Manager, thetools themselves needed a 32-bit operating system host
Additionally, the 64-bit edition was available only on the
Enterprise Edition, which is cost-prohibitive The upside for theSQL 2000 64-bit version was that large amounts of RAM weresuddenly available, and AWE wasn't needed to address
memory-intensive workloads Additionally, a new league of
servers became available, with up to 64 processors, allowing formassive calculation horsepower Along with these increasedmemory and processor capacities, Windows Enterprise DataCenter 2003 64-bit Edition provided more failover clusteringup
to eight nodes The success of 64-bit is really in the hands ofthe processor manufacturers: AMD and Intel Intel chose a
"pure" 64-bit processor called Itanium AMD differentiated itsproduct by offering the Opteron chipset, which worked with
both 32-bit and 64-bit applications and operating systems
Currently, the Opteron chip is more widely used, because not allcustomer applications have been ported to 64-bit Both
technologies have trade-offs
Advancements in SQL Server 2005
SQL Server 2005 Enterprise and Standard Editions are available
in 64-bit flavors For applications that need huge amounts ofRAM and processing power, Microsoft supports both the AMDX64 and Intel (64-bit Itanium and Xeon EM64T) platforms
bit chipsets includes the capability to run 32-bit versions of SQLServer 2000 and SQL Server 2005 This is called Windows on
Trang 28of RAM In a WOW environment, SQL Server is limited to 5GB ofRAM
Table 1-1 illustrates the essential differences between the threeflavors of 64-bit SQL Server 2005 support
Table 1-1 Differences Between SQL Server 2000 and 2005
64-Bit Support
SQL Server Edition
AMD X64 32-bit OS
64-bit OS WOW64
64-bit OS WOW64
Intel Itanium 64-bit OS
64-bit OS
Trang 29processor and chipsets are used in the SQL Server Engine forsuch things as query processing and floating-point operations
SQL Server 2005 includes 64-bit versions of Analysis Servicesand Integration Services SQL Server 2005 has also been
designed to operate more efficiently in Nonuniform Memory
Architecture (NUMA) systems Windows Server 2003 x64
provides high performance for both 32-bit and 64-bit
applications on the same system The underlying architecture isbased on 64-bit extensions to the industry-standard x86
instruction set, allowing today's 32-bit applications to run
natively on x64 processors At the same time, new 64-bit
applications are executed in 64-bit mode, which processes moredata per clock cycle, allows greater access to memory, and
speeds numeric calculations The end result is a platform thatleverages the existing wealth of 32-bit applications while alsoproviding a smooth migration path to 64-bit computing
Table 1-2
Trang 30platform When you install 64-bit SQL Server onto a WOW
system, you cannot install a 32-bit version of SQL Server by itsside
large memory consumption Complex queries that use Transact-bit processing should help with the following scenarios:
Trang 31a larger single server should consider using the 64-bit
edition This is especially true for applications that are
mixed in workload, wherein a read-only application may bestored completely in cache, and writes can happen
extremely quickly on the OLTP side
Customers looking to consolidate multitier applications, orapplications wherein user and data growth are expected toincrease rapidly, should consider the 64-bit version
Business intelligence applications, especially heavily usedreporting applications
Large data warehouses, whether they be relational datawarehouses or OLAP
Customers with large decision support systems that requiresignificant cube processing and OLAP capabilities shouldconsider the 64-bit version
More specifically, if your application is pushing SQL Server's
virtual memory capabilities, or if your application is putting
pressure on any of the following, you should consider a 64-bitplatform:
Procedure cache and cursor memory Applications that
use many stored procedures wherein the underlying data ischanging and needs updating via recompilation
Sort, index, and hash table memory Complex database
applications such as SAP or Great Plains applications, whichhave hundreds of indexes and complex joins in both
dynamic queries and stored procedures
Trang 32aggregations and such via the large memory capabilities of64-bit processing
As business intelligence applications become more prevalentacross the enterprise, use of the 64-bit platform will follow.Analysis and reporting applications are memory hogs that
require significant overhead for cube generation, processing,and refreshing For situations with multidimensional OLAP
(MOLAP), the capability of 64-bit platforms to generate
partitions, large dimensions, and such provides greater
scaleup/scalability
With the versions under our belts, we can now move forwardand look at the core capabilities of the database platform Thenext section revisits the notion of scalability Scalability is amany-headed hydra that can be approached from different
directions This book focuses on the core SQL Server Enginecapabilities It doesn't focus on writing code that scales well orstrategies for breaking up applications and databases for
scalability
Trang 33Scalability is one of the main decision factors for choosing anenterprise database system It refers to the capability to
process higher volumes of transactions, larger volumes of data,more complex queries, and more complex application
requirements Scalability is factored into hardware and softwarecomponents, with each being dependent on the other A trulyscalable system is balanced in its interaction between hardwareand software In the world of transaction processing (OLTP),scalability primarily describes a system's capability to handlehigher volumes of transactions Secondarily, it describes thecapability to handle more complex applications In the world ofdata warehousing (OLAP), the term is typically used to describe
a system's capability to handle larger volumes of data (VLDB)and more complex queries against that data
As an industry, manufacturers of database and application
software spend much of their time either trying to figure outhow to exploit new developments in hardware or trying to figureout how to deliver capabilities that go beyond those availablefrom the hardware In the area of scalability, this has resulted
in two basic approachesscale-up and scale-out With scale-up,hardware designers provide bigger and faster computer
systems, and software designers have to figure out how to takeadvantage of those systems With scale-out, software designersconnect multiple computer systems to create a larger network
of systems that can handle transaction volumes far in excess of
a single computer system Scale-up and scale-out each haveadvantages and disadvantages, and each basic approach hasseveral variations In reality, customers like yourself tend to do
a hybrid of both approaches So what did Microsoft ever do withscale-out?
First, Microsoft renamed scale-out federated databases and
used Distributed Partition View (DPV) to link the database and
Trang 34Microsoft customers at the time was unwieldy Microsoft didn'thave significant success with DPVs SQL Server 2005 reflectsthis, with changes made to DPVs Frankly, scale-up is lookingbetter than ever, with the new 64-bit editions With the
capability to process more than one million transactions per
minute, scale-up has plenty of headroom The original idea ofscale-out was to weave together smaller tables across severalservers to provide less of a single point of workload for
processing systems More specifically, the arithmetic and sortingfunctions posted by decision support systems (DSSs) are
system process hogs This was a manual method to physicallypartition data according to scheme It is and was hard to do.And performance was hard to get out of linked servers
SQL Server was borne from "shared nothing"parallel processing
on "commodity hardware." The original design calls for
automatic parallelism in processing of requests, and the
relational database model and SQL query language are suited toparallel processing At the same time, parallelism can be
increased by partitioning data By partitioning the data inlinewith processor and RAM resources, increased parallelism
provides greater performance Scale-up/shared nothing
unfortunately doesn't provide unlimited scalability, and the
challenge of federating servers increases the administrative
workload Although in theory scaleout can provide unlimitedperformance, in reality the performance of these systems hasalways been questionable And, as usual, it's cumbersome tomanage these systems, because it's difficult to vet problemsand keep the systems working harmoniously
In terms of physically partitioning data, Microsoft SQL Server
2005 does introduce a new partition scheme for the horizontalpartitioning of data in a table Table partitions provide a meansfor dividing very large tables across file groups, which are thebasic file structures for storing table data Table partitions allowfor the essential characteristic of DPVsthe distribution of mass
Trang 35increase query performance by limiting table scans and caching
of computed columns in memory The section "General DataAvailability" covers table partitioning if you want to jump ahead
The last five years have seen a 20-fold increase in the peak
volume of transactions a database system can support Thisimprovement, from approximately 50,000 transactions per
minute to one million transactions per minute, is the result ofhardware, operating system, and database management
system improvements For example, if we look at the TPC-Cnonclustered results for Microsoft SQL Server 2000 from 2001
to 2005, you'll see that SQL Server 2000 using 64-bit
technology crossed the one million transactions per minute
benchmark At the same time, looking into the benchmark
results, you'll see that SQL Server 2000 was used to generateterabytes (TB) of data This is a watershed event for SQL
Server, because that is 60 million transactions per hour! At thesame time, modern application coding practices followed
Guided by the realities of commerce, these practices evolvedhow applications are written Consider a simple e-commerceapplication It has a catalog database that is largely static,
except for product changes It has an order-placing functionalitythat is placed behind Secure Socket Layer (SSL) It also hasback-end processing capabilities such as real-time credit cardauthorization and shipping/inventory management Ideally, allthese processes would happen sequentiallyand with only onedatabase The reality, though, is that for many applications,maybe only credit card authorization and order capture are
done in real time, and the rest are done in batches In this newarchitecturewhere the database and software provide a service
to a customerthe e-commerce application is the salesperson.Database applications today look much different than they didonly 10 years ago
Trang 36
Over the last decade, the proliferation of web-enabled
applications has brought up the issue of interapplication
communication The loosely connected application model hascreated a means for applications and servers to act as serviceproviders This section shows you why applications live in thedatabase By loosely coupling one part of an application withanother, greater scalability is achieved by creating specialistdatabase applications that respond to only certain requests.Modern database systems are becoming containers for moreand more business logic The self-service nature of modernapplications has driven the business logic and data closer
together In reality, the smallest unit of parallel processingonerequest and one response from one responderis essentially
handled by the database At the heart of this communicationmodel is the reality that complex application systems are hard
executes successfully, it takes the database from one statethat is consistent with the rules to another state that is alsoconsistent with the rules
Trang 37In theory, by maintaining data in a Relational Database
Management System (RDBMS), greater performance can beachieved, to say nothing of easier maintenance The ability toprocess transactions without violating the ACID rules is the
central value of having the database act as the application
server What makes this all possible is the fact that applicationsneed to connect to a system that understands or has data aboutthe state By using transactions and identifiers, you can find theright information or at least determine its state SQL Server bynature is a state-management machine
SQL Server 2005 comes with no less than three application
server-type technologies: Notification Services (NS),
Replication, and the newest, SQL Service Broker (SSB) Thereare also native Web Services and the capability to host the NETFramework Originally, the purpose of the application serverwas to provide a middle-tier bridge between the database tierand customer presentation tierthe middle tier contained the
business logic The application server hid the data tier from thepresentation layer The idea was that business logic could beencapsulated in the middle tier This meant that each tier was aspecialist, and scalability and the other "abilities" would comealong for the ride In reality, three-tier applications are difficult
to do Moreover, the advances in hardware meant that morevalue could be derived from a single server by putting morecode on itmeaning more applications As business logic was
being moved to the database, captured in stored procedures,
Trang 38dissolved Thanks to the e-commerce revolution, databases areexposed to the presentation layer on a scale never before seen
The way e-commerce applications are designed, reflecting theintegration of business processes with databases, brings us tothe architectural model called Service-Oriented Architecture(SOA) SOA can loosely be defined as a collection of servicesthat communicate with each other The database logic is
directly tied to business logic Moreover, the database objectshave expectations about what data will be passed to them andwhat data they should send back For example, many creditcard processing services expose a web service for submitting acredit card authorization request The replying database
application knows what valid data is and how to process it Anydata that is passed to the credit card authorization service that
is not in the correct form is rejected The Microsoft version ofthe SOA movement has its origins in the Distributed ComponentObject Model (DCOM) DCOM is a foundational technology ofthe Microsoft Windows operating system and is complementary
to the current object framework: NET DCOM and the NET
Framework represent the modern system approach to computerscience that sprang from the object-oriented programming
(OOP) model In OOP, the idea of creating objects and applyingmethods to them is very similar to the SOA At the core of OOP
is the idea that code serves a function This means that the
very essence of OOP is a service The SOA at its deepest level iswhat makes the operating system useful In business
applications, the service approach lets you do things like place
an order, ship a box, and capture credit card authorization
Under the service model is a communication model that is notunlike the human communication model In SQL Server 2005, anew framework called SQL Service Broker allows message anddata transport to happen while encapsulating business
processes and logic in a parallel fashion
SQL Server 2005 ships several technologies that can be
Trang 39messages SQL Service Broker is plumbing built into the SQLServer Engine to allow messaging to happen within the serverand across servers The messaging is accomplished via
extensions to Transact-SQL Data Manipulation Language (DML).SQL Service Broker provides a robust infrastructure for bindingbusiness logic, message delivery, and queuing, as well as thehost of features needed for a successful transactional
messaging platform You'll read about Service Broker in depth
in Chapter 4
The second interesting SOA-oriented feature is Native XML WebServices Encapsulating the idea that business logic and serviceroles are encapsulated in a service exposed to the web via anXML interface, XML Web Services provides a robust and
interesting technology for extending the database as a SOA
interface Within the XML Web Services is a stored procedure,which essentially fulfills some business role For example, in thepast you might have filled out an order form Today, you send
an XML payload containing the order information through a webservice via an exposed stored procedure XML Web Services is asimplified form of SOA messaging Web Services in SQL Server
2005 exposes stored procedures and queries Web Services isn't
a panacea, because the SQL Server Engine has to go through anumber of processing steps to convert the XML into a more
usable state XML Web Services in SQL Server 2005 are turnedoff by default Another interesting way to think about the SOA
in the database tier is NET Framework hosting
The capability of SQL Server 2005 to act as a host for the NETFramework is quite interesting Although many database
administrators (DBAs) will find the Common Language Runtime(CLR) a so-what technology, its implications for the future ofdatabase application design are incredible You can read all
about NET Framework hosting in Chapter 4 For now, we'll say
Trang 40I believe in the future more and more business logic will be
represented in database application-level coding The future willpresent a world with more and more server-to-server
interaction, with human interaction happening at the
management and analysis levels Simply look at the emergence
of peer-to-peer applications, IP TV, and Really Simple
Syndication (RSS) With all this complexity and business logicrequiring 24/7 availability of database systems, SQL Server
2005 presents significant new technologies for availability Thenext section provides an overview of the availability
technologies