An Overview of SQL Server 2005 For The Database Administrator

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

An Overview of SQL Server 2005 for the Database Administrator

Published: July 17, 2004

By Eric Brown

Summary: This document provides an overview of new features in Microsoft®


SQL Server™ 2005 for database administration and database availability, scalability, and
security.
On This Page
Introduction
High Availability and Scalability
Extending High Availability to All Database Applications
Minimizing the Maintenance Window
Database Development, Deployment, and Management: A Revolutionary Tool Set
Deploying SQL Server 2005
Tools for Management and Performance Tuning
Conclusion
Appendix
Introduction
Microsoft® SQL Server™ 2005 provides the Microsoft® Windows Server System™
integrated server software with a database platform for the next generation of connected,
scalable, and reliable enterprise applications. The breadth and depth of innovation in this
version is in response to the needs of customers. This white paper is targeted to database
administrators, to give you an understanding of the new features in and capabilities of
SQL Server 2005. From many enhancements of existing features, to an entirely new
security model, database administration is now more productive and in tune with the
needs of the administrator.
The world of the DBA is changing. DBAs now increasingly are asked by the
organizations they work for to manage more systems with larger amounts of data, while
at the same time organizations are trying to keep IT costs the same or even to lower costs.
Simultaneously, DBAs are being asked to give more of their time to help corporate
developers to understand data models and the best data access paradigms for building
reliable applications that perform to the scale that the corporation requires. With these
tensions, DBAs need more from their database technologies in terms of enterprise
manageability, scalability, and availability. SQL Server 2005 provides the bedrock
foundation that DBAs can bet on to build their next generation IT infrastructure.
At the core of SQL Server 2005 are new infrastructure application capabilities. SQL
Service Broker is a distributed application framework that provides a new form of
scalability and reliability for asynchronous message delivery. Though not new,
Microsoft® SQL Server™ Notification Services, Reporting Services, and SQL Server
Mobile Edition (formerly called SQL Server CE) are all greatly enhanced in
SQL Server 2005.
SQL Service Broker
Over the last 10 years, the proliferation of e-commerce applications has created a need
for increased process management across database applications. If you've ever built an
order entry system designed for online customer ordering, you're familiar with the
complexities of the process at the back end. For example, when a customer places an
order for a book, the order needs to commit transactions into the inventory, shipping, and
credit card systems of the database, and must also send an order confirmation using
another Web application. Waiting for each of these processes to happen in order doesn't
scale well. SQL Server 2005 provides a new scalable architecture for building
asynchronous message routing.
The Service Broker technology allows internal or external processes to send and receive
guaranteed, asynchronous messages by using extensions to normal Transact-SQL data
manipulation language (DML). Messages are sent to a queue in the same database as the
sender, to another database in the same instance of SQL Server, or to an instance of SQL
Server either on the same server or on a remote server. Service Broker brings the best of
asynchronous messaging with the best transactional support available, the SQL Server
relational engine.
Reporting Services
With the release of SQL Server 2005, Microsoft extends a major new component of its
integrated business intelligence (BI) platform. SQL Server Reporting Services expands
the Microsoft business intelligence vision by making it easy to get the right information
to the right people, in any business environment.
Reporting Services is a complete, server-based platform for creating, managing, and
delivering traditional and interactive reports. It includes everything you need "out of the
box" to create, distribute, and manage reports. At the same time, the modular design and
the extensive application programming interfaces (APIs) of Reporting Services enable
software developers, data providers, and enterprises to integrate reporting with legacy
systems or third party applications.
Reporting Services ships with SQL Server 2005 and includes:
• A complete set of tools for creating, managing, and viewing reports.
• An engine for hosting and processing reports.
• An extensible architecture and open interfaces for embedding reports or
integrating the solution in diverse IT environments.
Notification Services
Notification Services is a platform for developing and deploying applications that
generate and send notifications to users. Notifications are personalized, timely messages
that can be sent to a wide variety of devices.
Notifications reflect the preferences of the subscriber. The subscriber enters a
subscription to express an interest in information. For example, "notify me when the
stock price of Adventure Works reaches $70.00," or "notify me when the strategy
document my team is writing is updated."
A notification can be generated and sent to the user as soon as a triggering event occurs,
or can be generated and sent on a predetermined schedule that the user specifies. The
user's subscription specifies when the notification should be generated and sent.
Notifications can be sent to a wide variety of devices. For example, a notification can be
sent to a user's mobile phone, personal digital assistant (PDA), Microsoft Windows®
Messenger, or e-mail account. Because these devices often accompany the user,
notifications are ideal for sending high-priority information.
SQL Server Mobile Edition
Microsoft® SQL Server™ 2000 shipped with Microsoft SQL Server 2000 Windows CE
Edition. This is now called Microsoft SQL Server Mobile Edition, and can be developed
and managed through the new SQL Server Management Studio. You can now create a
SQL Server Mobile Edition database on the desktop or on the device, directly from SQL
Server Management Studio. You can also manipulate the schema of the SQL Server
Mobile Edition database directly from Management Studio, regardless of whether the
database resides on the mobile device or on the desktop. You can create subscription
databases and pull data from a SQL Server publication database through Management
Studio into a SQL Server Mobile Edition database either on the desktop or on the device.
Lastly, you can run queries through Management Studio that will target a SQL Server
Mobile Edition database on the device or on the desktop, and you can take advantage of
new SQL Server Mobile Edition features that include an XML showplan rendered in a
GUI format just like native SQL Server, and the ability to use query hints to override the
query optimizer. SQL Server Mobile Edition is integrated with Data Transformation
Services (DTS). You can now access non-SQL Server data sources and bring data
directly into a SQL Server Mobile Edition database on the desktop by using DTS objects
in Microsoft® Visual Studio® 2005 applications. SQL Server Mobile Edition also takes
direct advantage of new merge replication performance improvements that greatly
increase the scalability of a single server with thousands of simultaneously connected
SQL Server Mobile Edition subscription databases.
As you can see, there are many changes to the infrastructure of the SQL Server platform.
The database engine provides a mature and reliable infrastructure for scalability,
reliability, and security. The frameworks mentioned above participate in failover
clustering, backup and restore, and transactional logging, and you can administer them
from SQL Server Management Studio.
Top Of Page
High Availability and Scalability
SQL Server 2005 makes significant strides in database availability and reliability.
Downtime falls into two categories, planned and unplanned. Unplanned downtime is
really disaster recovery, and requires special planning and infrastructure. Failover
clustering can be used to keep the system online during planned maintenance, and this
technology is enhanced in SQL Server 2005. Additionally, SQL Server 2005 introduces
database mirroring, a new technology that provides an easy to use option for database
availability.
Failover Clustering
SQL Server 2005 failover clustering provides high availability support for server-wide
failure. With failover clustering, the operating system and SQL Server work together to
provide failure protection by providing redundant hardware and an automated mechanism
to move the database server to secondary hardware in the event that the primary fails.
Failover clustering supports up to eight nodes, depending on which edition of Microsoft®
Windows Server™ 2003 is running on the server.
SQL Server has extended the abilities of failover clustering to SQL Server Analysis
Services, Notification Services, and SQL Server replication. With SQL Server 2000,
SQL Server Agent and other job management and processing capabilities were not
covered by failover clustering. Now, the technologies are clustering aware; SQL Server
failover clustering is now a more complete server-level redundancy solution.
Top Of Page
Extending High Availability to All Database Applications
SQL Server 2005 extends the data availability frontier in new directions with copy-on-
write technology. SQL Server 2005 introduces a new high-performance transaction
transmission technology for database-level availability—database mirroring. With
database mirroring, transactions changes are shipped to another server as the logs are
written. All logged changes to the database instance are quickly available for copying to
another location.
Database Mirroring
SQL Server 2005 significantly enhances the capabilities of log shipping by providing you
with a database mirroring option. Database mirroring allows continuous streaming of the
transaction log from a source server to a single destination server. In the event of a failure
of the primary system, applications can reconnect to the database on the secondary server
almost immediately, without waiting for recovery to finish. The secondary instance
detects failure of the primary server within several seconds and accepts database
connections almost immediately after detecting a failure. Unlike failover clustering, the
mirrored server is fully cached and ready to accept workloads because of its synchronized
state.
A database mirroring system requires three servers that are running SQL Server, and each
server has a specific architectural role: the "principal," the "mirror," and the "witness."
The principal server is the server on which applications connect and where transactions
are processed. The mirroring server is the target of transaction log records, which can be
applied either synchronously or asynchronously. The mirroring server exists in a state
that does not allow direct read access to the data. As transaction log records are generated
on the principal server, they are continuously replayed on the mirroring server, producing
a state in which the mirroring server is normally behind the principal server only by the
time it takes to replay the log written in a single log write. This provides a duplicate of
the data at a point in time.
The witness server is an arbiter within the architecture, providing the tie-breaking "vote"
in determining which server is "the principal" and which is "the mirror". Two servers in
the architecture must agree in order for a server to be designated the principal and thus
the target of all transactions. From a client application point of view, the failover from
one server to the next is automatic and nearly instantaneous. The server that is "the
witness" is only needed in instances were automatic failover is needed.
One of the most important things about database mirroring, besides the extremely low
latency provided during a failover from the principal to the mirror, is the ability to
synchronize changes in both directions. In the event that the principal goes offline and the
application fails over to the mirror, the mirror then becomes the principal server in the
architecture. When the failed server comes back online, it is designated the mirror and
transaction log records from the principal are applied to it to bring it into synchronization
with the state of the database at that point in time.
Database mirroring works on standard server hardware and requires no special storage or
controllers.
While database mirroring provides continuous support, there are many scenarios where a
"snapshot" of the database is needed: as a "warm to cold" standby; as a test and
development database; or as a reporting database. Copy-on-write technology provides
this capability in the form of a database view.
Database Snapshot
SQL Server 2005 introduces the capacity for administrators to generate and use a read-
only, stable view of a database. The database snapshot provides this capability without
the overhead of creating a complete copy of the database or storage requirement. As the
primary database diverges from the snapshot, the snapshot gets its own copy of original
pages when they are modified. The snapshot may be used to recover an accidental change
to a database by simply reapplying the pages from the snapshot to the primary database.
Replication
Replication is designed to increase data availability by distributing the data across
multiple databases. Availability is increased by allowing applications to scale up out the
SQL Server read workload and across databases, or by synchronizing offline data with
mobile user databases that occasionally connect. SQL Server 2005 enhances the
availability options in these two spectrums by using a new peer-to-peer model that
provides a new topology in which databases can be synchronized transactionally with any
identical peer database. This increases database availability by enabling a higher "read"
workload against the distributed data while also providing the fault tolerance of the
redundant distributed databases. A new option for replicating through http:// and https://
increases the availability of data for mobile scenarios, which enables synchronization
over the Internet. The new Oracle Publishing feature enables replication from Oracle
databases into SQL Server, improving the availability of heterogeneous data within the
enterprise.
Top Of Page
Minimizing the Maintenance Window
One of the biggest headaches for database administrators is having to restart the database
server for changes in SQL Server system parameters. SQL Server 2005 has substantially
reduced the number of parameters that require restart. You can now alter the database
server affinities for CPU and RAM memory without being required to restart. As part of
the development cycle, every feature that previously required a restart now no longer
requires a restart. When planned or unplanned downtime does happen, the time that it
takes to completely recover has been reduced by the "on the fly" database capabilities in
SQL Server 2005 that use rolling restores. Additionally, SQL Server provides the ability
to create and manage indexes online, so that you no longer have to take the database
offline for these tasks.
Online Index Operations
The ability to create, rebuild, or drop an index online is an enhanced feature of
SQL Server 2005 that augments the indexing capabilities of earlier versions of
SQL Server. The online index option allows concurrent modifications (updates, deletes,
and inserts) to the underlying table or clustered index data and any associated indexes
during index data definition language (DDL) execution. For example, while a clustered
index is in the process of being rebuilt, you can continue to make updates to the
underlying data and can perform queries against the data. In earlier versions of
SQL Server, index DDL operations such as rebuilding held exclusive locks on the
underlying data and the associated indexes, preventing modifications or queries until the
index operation was complete. With support for online index operations, you can add the
indexes without interfering with access to the tables or other existing indexes.
Additionally, the server workload allows for index operations to take advantage of
parallel processing.
Online Restore
SQL Server 2005 introduces the ability to perform a restore operation while an instance
of SQL Server is running. Online restoration capabilities improve the availability of
SQL Server because only the data that is being restored is unavailable. The rest of the
database remains online and available. Earlier versions of SQL Server require that you
bring a database offline before you perform a restoration.
You can choose between two options when you use online restore:
• An online file-level restore of an entire database file
• An online restore of a filegroup, because a filegroup is nothing more than a
collection of files.
Fast Recovery
SQL Server 2005 improves the availability of SQL Server databases with a new faster
recovery option. Users can reconnect to a recovering database after the transaction log
has been rolled forward. Earlier versions of SQL Server required users to wait until
incomplete transactions had rolled back, even if the users did not need to access the
affected parts of the database.
Read/write operations can continue in parallel with the undo phase of recovery. However,
operations that access the locked data for the undo phase will experience normal blocking
within the database until the undo operation releases locks on that data.
Mirrored Backups
Earlier versions of SQL Server supported only a single copy of a given backup. If backup
media was damaged, roll-forward would take longer, or would fail. In SQL Server 2005,
backup media can now be mirrored. For example, you can set up four tape devices to
back up two media families, with a mirror for each media family. The corresponding
volumes in each mirror have identical content, making them interchangeable at restore
time. You can implement up to four mirrored backup sets.
Top Of Page
Database Development, Deployment, and Management: A Revolutionary
Tool Set
While many features in SQL Server are evolutionary, there is one area of SQL Server that
is revolutionary—the tool set. SQL Server Management Studio is the first database
administration suite that allows users to connect to and work with SQL Server, Analysis
Services, and a SQL Server Mobile Edition database. Moreover, you can also manage
DTS, Reporting Services, and Notification Services applications. Whether you're a
serious Transact-SQL developer or are new to SQL Server, the SQL Server tool set
provides the flexible and intelligent architecture that you need to accomplish database
tasks.
The SQL Server 2005 tool set is focused on three primary usage scenarios: authoring,
management, and operations. Each of these scenarios has unique tools and features. Let's
start with a look at the new tools for development.
SQL Server Management Studio Query Editor
SQL Server 2005 replaces SQL Query Analyzer with the Query Editor, a component of
SQL Server Management Studio and the primary tool for designing and testing Transact-
SQL statements, queries, batches, and scripts interactively. With the Query Editor, you
can write new scripts in Transact-SQL and Multidimensional Expressions (MDX). You
can also edit scripts that are created from files or that are automatically generated from
SQL Server Management Studio dialog boxes or from SQL Object Explorer.
The Query Editor offers:
• Statement auto-completion, a list of possible objects that might follow certain
keywords for system stored procedures.
• Parameter tipping for system stored procedures to provide a list of parameters that
follow stored procedures and user-defined functions.
• Color-coding of Transact-SQL and MDX syntax to improve the readability of
complex statements.
• Templates to speed development of the Transact-SQL statements for creating SQL
Server objects.
• Editing of execute and parse queries with SQLCMD extensions.
• Results presented in either a grid or a free-form text window, or in XML form,
when using the XML column or XML functions for Transact-SQL.
• Graphical representation of the showplan information, presenting the logical steps
built in to the execution plan of a Transact-SQL statement.
Top Of Page
Deploying SQL Server 2005
Tools for Deployment and Configuration
Many database administrators need to have greater control of SQL Server during the
configuration and set up stages of database application deployment. The ability in
SQL Server 2005 to alter basic parameters and locations of files provides greater
flexibility for application security and resource management. The following sections
present an overview of some of the changes in SQL Server 2005 that relate to setup and
configuration.
Microsoft Windows Installer
Setup for SQL Server 2005 uses Microsoft Windows Installer to completely integrate the
installation of SQL Server features in a single feature tree. Minimum and typical
installation modes are no longer implemented. Instead, Setup displays a feature tree with
default options selected; you can then customize installation by selecting and clearing
items on the feature tree and specifying installation paths. This version of Windows
Installer also supports remote setup and multiple instance configurations.
Consistency Checker
Setup for SQL Server 2005 provides a Setup Consistency Checker (SCC), a new feature
that checks and validates the target computer before setup begins. Using Microsoft
Windows Management Instrumentation (WMI) technology, the consistency checker
prevents setup failures that are due to unsupported configurations on local, remote, or
clustered target computers. If Setup can fix failed check items, you can allow Setup to
take the necessary action. Otherwise, the consistency checker will guide you to a solution
for each blocking issue before Setup can continue.
Failure Reporting
Setup for SQL Server 2005 includes improved failure reporting and extensible alerts. If
an error occurs during installation, Setup determines a failure exit code, provides a
descriptive error message, recommends corrective actions to take for resolution, and
points you to the setup log. Setup also saves the log from each installation.
Computer Manager
Computer Manager is a replacement for the Client Network Utility, SQL Server Network
Utility, and SQL Server Service Manager. Computer Manager in SQL Server 2005
provides the ability to work with Analysis Services, Reporting Services, previous
versions of SQL Server, and full-text search and Microsoft Search. From within
Computer Manager, you can define network protocols for client and server network
access. Computer Manager is supported by WMI.
Top Of Page
Tools for Management and Performance Tuning
SQL Object Explorer
The new SQL Server Management Studio integrates the functionality of Enterprise
Manager and Analysis Services from earlier versions of SQL Server. SQL Object
Explorer provides all of the same functionality as Enterprise Manager. Enhancements
include greater scalability when you explore database objects, and the integration of
scripting across OLTP and online analytical processing (OLAP) databases. SQL Server
2005 and SQL Server Mobile Edition include support for Analysis Services, DTS,
Reporting Services, and Notification Services. SQL Object Explorer provides all of the
administration capabilities that you expect from Enterprise Manager, including Security,
SQL Server Agent, SQL Mail, and the other SQL Server sub systems, which include
DTS, Notification Services, and Reporting Services.
Maintenance Plans
In earlier versions of SQL Server, you create database maintenance plans by using a
single wizard, and they create multiple agent jobs as an output. These agent jobs
themselves contain command-line parameters that indicate the function to perform.
Although the Database Maintenance Wizard answers a few key customer scenarios (such
as full database backups), it is not possible to either define other scenarios such as
differential backups or to easily obtain exactly which Transact-SQL command was
actually being executed for the maintenance task.
SQL Server 2005 provides a completely renovated design that provides the ability for
you to define almost any SQL Server related maintenance task. The Maintenance Plan
feature in SQL Server 2005 utilizes the power of the design surfaces in DTS Designer,
allowing you to define workflow within your maintenance plan.
SQL Profiler and Database Tuning Advisor
SQL Server 2005 introduces a new index tuning tool called the Database Tuning Advisor
(DTA). The DTA has the ability to suggest index and table partition changes to a
database structure. Additionally, SQL Profiler has undergone extensive revision in SQL
Server 2005, resulting in greater performance and providing deeper visibility into the
server. Following are the biggest changes to SQL Profiler:
• Profiling of Analysis Services. SQL Profiler now supports capturing events that
are raised by Analysis Services.
• Saving of traced Showplan as XML. New XML-based Showplan events have been
added and you can now save Showplan results in an XML format. Results that are
saved in this manner can later be loaded for graphical Showplan display in SQL
Server Management Studio. Deadlock events also use XML text in returning
deadlock information. As with Showplan events, deadlock events may also be
persisted to disk as XML and later re-graphed in SQL Server Management Studio.
This includes a graphical deadlock statement.
• Saving trace results as XML. You can save trace results in an XML format in
addition to the standard formats of ANSI, UNICODE, and OEM. Once saved in
XML format, trace results can be edited and loaded back into SQL Profiler for
replay.
• Aggregating view. You can choose an aggregate option and select a key for
aggregation. This will enable you to see a view that shows the column on which
the aggregation was performed, along with a count for the number of rows that
make up the aggregate value.
• SQL Profiler can correlate performance monitor counters with SQL Server or
Analysis Services events. You can select from a pre-defined set of performance
monitor counters and save them at specified time intervals, while also
independently collecting a SQL Server or Analysis Services trace. Trace and
performance data that overlap in time will be correlated by relating the graphically
represented counters to trace results (which are presented in tabular form).
Showplan Enhancements
Microsoft SQL Server 2005 introduces enhancements to Showplan and Deadlock Traces
that provide you with additional capabilities for tuning database servers. These
enhancements include:
• Showplan results are saved in an XML format, which later can be loaded for
graphical display in the Query Editor.
• The ability to save Showplan results in an XML format provides a number of
benefits for performance tuning: Showplans can be saved, transferred to another
location, and viewed without the need to have an underlying database.
You can use an exported Showplan to aid in identifying discrepancies between different
in-house or remote databases.
SQLCMD
SQLCMD is the new command prompt utility for working with SQL Server 2005. It
replaces the OSQL command prompt utility. The SQLCMD utility allows you to enter
Transact-SQL statements, system procedures, and script files at the command prompt.
SQLCMD supports the functionality of OSQL or ISQL, but also introduces a richer set of
commands allowing for better operation in application scripts, such as Microsoft® Visual
Basic® for Applications (VBA) scripts.
Dedicated Administrator Connection
SQL Server 2005 introduces a dedicated administrator connection to access a running
server even if the server is not responding or is otherwise unavailable. This allows you to
execute diagnostic functions or Transact-SQL statements in order to troubleshoot
problems on a server. The connection is activated by members of the sysadmin fixed
server role and is only available through the SQLCMD command prompt utility locally,
or from a remote machine.
In earlier versions of SQL Server, it is not possible to connect to a server that is not
responding to a SQL Server connection. To use the dedicated administrator connection,
execute the SQLCMD utility at the command prompt by using the -A switch to specify a
dedicated connection. From there, you can diagnose and repair the problem.
SQL Management Objects
SQL Management Objects (SMO) is a new set of programming objects that expose the
functionality of the SQL Server database. SMO is implemented as a
Microsoft® .NET Framework assembly. You can use SMO to automate repetitive or
common SQL Server administrative tasks, such as programmatically retrieving
configuration settings, creating new databases, applying Transact-SQL scripts, creating
SQL Server Agent jobs, and scheduling backups.
The SMO object model extends and replaces Distributed Management Objects (DMO),
which was included with earlier versions of SQL Server. SMO includes many
improvements over DMO, including a .NET Framework object model, advanced
scripting operations, offline management of SQL Server configuration settings, partial or
delayed instantiation of objects, capture mode execution, delegated execution, and
releasable object state. Although SMO is a .NET Framework class library, its
functionality is still available through Component Object Model (COM) (late bound
only). Some examples of SMO utilization are:
• An Internet service provider (ISP) needs to provide delegation of SQL Server
administration to its clients in a shared database environment. The ISP wants to
provide a Web interface and limit the types of tasks that can be performed. The
development team at the ISP develops an ASP.NET application by using the SMO
object model to build a simple administrative interface, which the ISP provides to
its customers.
• A database administrator wants to delegate basic administration tasks to the Help
desk, such as adding new users for the company's SQL Server databases. An IT
developer creates a simple Web interface built with the SMO object model, and
deploys the interface on a secure area of the company's intranet.
SQL Server Agent
In SQL Server 2000, SQL Server Agent jobs run under the account that created the job. A
proxy account can be specified to run CmdExec and COM-based jobs. SQL Server 2005
introduces the following changes to SQL Server Agent security:
• The creation of an Agent user role. Only users that are explicitly added will be
able to add, edit, or execute SQL Server Agent jobs.
• The ability for system administrators to create one or more proxy accounts and
include proxies for other SQL Server subsystems, including DTS.
• The ability to assign users or groups (SQL Server groups) to use proxy accounts.
Every SQL Server 2005 management action can be scheduled to be run by SQL Server
Agent from SQL Server, using Transact-SQL or SQL Management Objects (SMO).
SQL Server 2005 provides new objects and counters for SQL Server Agent that Windows
System Monitor can use to monitor the activity of SQL Server Agent, including enabled
jobs, enabled alerts, enabled schedules, active jobs, active alerts, percentage of job
success, and so on. The counters also enable the ability to configure alerts that are
triggered by SQL Server Agent performance counter conditions.
Transact-SQL Enhancements
Enhancements to Transact-SQL in SQL Server 2005 reflect greater conformity to the
ANSI-99 SQL specification, as well as response to requests from customers. This section
highlights some of the changes to Transact-SQL, many of which focus on greater
expressiveness in queries.
The new common table expression (CTE) functionality provides the ability to generate
query batches in cases where a derived table would be used today. A CTE is a temporary
named result set that can be referred to by a defining statement. In its simple form, you
can think of a CTE as an improved version of a derived table. You refer to a CTE in the
FROM clause of a query, similar to the way you refer to derived tables and views. CTE
functionality provides a flexible and expressive way to reorganize normalized data.
One of the biggest additions to Transact-SQL is the recursive query, which furthers the
ability to manipulate relational data. A recursive query is a new query type that provides
generation of a bill of materials or a hierarchical result set. There are new PIVOT and
UNPIVOT operators. These operators perform a manipulation on an input table-valued
expression and produce an output table as a result set. The PIVOT operator rotates rows
into columns, and may perform aggregations or other mathematical calculations along the
way. It widens the input table expression based on a given pivot column, generating an
output table with a column for each unique value in the column. The UNPIVOT operator
performs an opposite operation to PIVOT, rotating columns into rows. It narrows the
input table expression based on a pivot column. These new recursive queries provide a
way to reshape data.
Several Transact-SQL enhancements focus on the ability to formulate results based on
the application of an operator. The new APPLY relational operator allows you to invoke
a specified table-valued function once per each row of an outer table expression. You
specify APPLY in the FROM clause of a query, similar to the way you use the JOIN
relational operator. With the APPLY operator, SQL Server 2005 allows you to refer to a
table-valued function in a correlated subquery. APPLY comes in two forms: CROSS
APPLY and OUTER APPLY. CROSS APPLY invokes a table-valued function for each
row in an outer table expression. You can refer to columns of the outer table as
arguments to the table-valued function. CROSS APPLY returns a unified result set out of
all of the results that are returned by the individual invocations of the table-valued
function. If the table-valued function returns an empty set for a given outer row, that
outer row is not returned in the result. OUTER APPLY is very similar to CROSS
APPLY, with the addition that it also returns rows from the outer table for which the
table-valued function returned an empty set. For more information about the capabilities
in SQL Server 2005 for reshaping and manipulating data, see SQL Server Books Online.
SQL Server 2005 modernizes the transactional capabilities of queries by adding an error
handling capability. SQL Server 2005 introduces a simple but powerful exception-
handling mechanism in the form of a TRY/CATCH Transact-SQL construct. Transaction
abort errors that cause a batch to terminate in earlier versions of SQL Server can be
caught and handled in SQL Server 2005. For example:
SET XACT_ABORT ON
BEGIN TRY
BEGIN TRAN
INSERT INTO T1 VALUES(1)
/* perform other activity */
PRINT 'After INSERT.'
COMMIT
END TRY
BEGIN CATCH TRAN_ABORT
ROLLBACK
/* perform corrective activity */
PRINT 'INSERT failed.'
END CATCH
Additionally, there are new language constructs in SQL Server 2005 for security,
replication, Notification Services, XML, and all of the .NET Framework features. To
learn more about all of the new functionality in SQL Server 2005, see SQL Server Books
Online.
Security Enhancements
SQL Server 2005 makes significant enhancements to the security model of the database
platform, with the intention of providing more management and security options to both
developers and administrators. A considerable investment has been made in a number of
features covering a broad spectrum; for example, enforcing policies for SQL Server login
passwords (in the authentication space), providing for more granularity in terms of
specifying permissions at various scopes (in the authorization space), and allowing for
the separation of owners and schemas (in the security management space).
Furthermore, keeping in mind core security tenets like "reduction in surface area" and
"principle of least privileges," and sound principles like "secure defaults and designs,"
certain product-wide changes are also being prepared for the final version of the product.
Two Special Scalability Features
There are two scalability features in SQL Server 2005 that are worth mentioning for very
large database scenarios. Snapshot isolation level allows users to access the last row that
was committed, by using a transitionally consistent view of the database. This new
isolation level provides the following benefits:
• Increased data availability for read-only applications
• Non-blocking read operations allowed in an OLTP environment
• Automatic mandatory conflict detection for write transactions
• Simplified migration of applications from Oracle to SQL Server
For example, locking can cause blocks between applications that are reading and writing
the same data simultaneously. If a transaction changes a row, another transaction cannot
read the row until the write commits. With snapshot isolation, the reader can access the
previous committed value of the row.
The second special scalability feature is table partitioning. While the concept of
partitioning data across tables, databases, and servers is not new to the world of
databases, SQL Server 2005 provides a new infrastructure capability for partitioning of
tables across filegroups in a database. Horizontal partitioning allows division of a table
into smaller groupings based on a partitioning scheme. Table partitioning is designed for
very large databases, from hundreds of gigabytes to terabytes and beyond. Very large
database (VLDB) query performance is improved with partitioning. By partitioning
across a range of partitioning column values, subsets of data can be managed and
reassigned to other tables quickly and efficiently. To learn more about partitioning, see
SQL Server Books Online.
Top Of Page
Conclusion
SQL Server 2005 provides the technologies and capabilities that organizations and
database administrators count on. The spectrum of new and enhanced functionality that
affect database administration is immense. This paper provides only an introduction to all
of the new functionality in SQL Server 2005.
Top Of Page
Appendix
New Data Types
• XML data type. An XML data type that allows you to store an XML fragment or
document in SQL Server databases. Instances of an XML data type can be
columns in a table, functions, or stored procedure arguments, or variables in a
function or stored procedure. In addition, the XML data type can be specialized by
indicating an associated XML schema that provides both a validation constraint
and type information for the data for the XML instance.
You perform operations on an instance of an XML data type by using built-in
XML query methods. These methods accept queries and data manipulation
statements that are appropriate for XML data. You can then specify queries
(XQuery) against the XML that is stored in the XML data type variable or column,
and apply updates (using insert, update, or delete) to the XML instance. You can
also use an XSD to create an index for the XML column, which will improve
query performance.
• Varchar(max). The nvarchar(max) and varbinary(max) data types hold up to
2 gigabytes (GB) of data and are useful alternatives to the text, ntext, and image
data types.
Overview of SQL Server 2005/2008 Table Indexing
(Part-1)
By Md. Marufuzzaman | 25 Aug 2009 Part of The SQL Zone.

Basic overview of SQL Server 2005/2008 Table Indexing


Top of Form
/w EPDw UKMTAy

/w EWCALQoo+h

Table of Contents
1. Overview
2. What is an Index?
3. Why Use an Index?
4. Types of Indexes?
○ 4.1 Clustered
○ 4.2 Non-Clustered
5. Uniqueness
6. Creating a Table
7. Creating an Index
○ 7.1 Creating an Index - Table Designer
○ 7.2 Creating an Index – Transact-SQL
○ 7.3 Drop an Index
8. Index and Statistics
9. Summary
10. References
11. History

1. Overview
Human needs have increased tremendously. Now people are doing much more composite
tasks than ever before. The society has become very complex, a person has to work with
huge amount of information every day. In order to work with the enormous information,
we must have a system where we can store, manipulate and share the information all over
the world. It is one of the core reasons for introducing Database Management Systems
(DBMS) as well as Relational Database Management Systems (RDBMS) now-a-days.
So, one thing is clear to us that we store and manipulate data / information into a
database, where the database contains various types of tables for storing various types of
data / information.
Developers can create tables of a database; it would be possible to stop at this point and
just start working with our data from here. However this would not be one of our best
choices, but why? Because it is not really a good idea for better performances, let’s take
an example:
“A library has a huge collection of books, files, etc... A student requests the librarian for
a book of Microsoft SQL Server 2008, if we think without an index the librarian had to
find this without any help s/he has to search one by one! Which must be time consuming;
so with a proper arrangement, that is with the help of an index, it very much easier and
faster to find out the desired one.”
There are many ways to create an index, but first of all we need to know what is an index
is and how it is held within SQL Server.
2. What is an Index?
A SQL table explanation is not good enough for getting the desired data very quickly or
sorting the data in a specific order. What we actually need for doing this is some sort of
cross reference facilities where for certain columns of information within a table, it
should be possible to get whole records of information quickly. But if we consider a huge
amount of data in a table, we need some sort of cross reference to get to the data very
quickly. This is where an index within SQL Server comes in.
So an index can be defined as:
• “An index is an on-disk structure associated with a table or views that
speed retrieval of rows from the table or view. An index contains keys
built from one or more columns in the table or view”. These keys are
stored in a structure (B-tree) that enables SQL Server to find the row or
rows associated with the key values quickly and efficiently.”
• “An index is a database object created and maintained by DBMS. It is
essentially a list of the contents of a column or group of columns.
Indexes are ordered so that extremely first search can be computed
through them to find data.”

3. Why Use an Index?


Use of SQL server indexes provide many facilities such as:
• Rapid access of information
• Efficient access of information
• Enforcement of uniqueness constraints
Correct use of indexes can make the difference between a top performing database with
high customer satisfaction and a non-performing database with low customer satisfaction.
4. Types of Indexes
SQL Server has two major types of indexes:
1. Clustered
2. Non-Clustered
The index type refers to the way the index is stored internally by SQL Server. So a table
or view can contain the two types of indexes.
4.1 Clustered
An index defined as being clustered, defines the physical order that the data in a table is
stored. Only one cluster can be defined per table. So it can be defined as:
• Clustered indexes sort and store the data rows in the table or view
based on their key values. These are the columns included in the index
definition. There can be only one clustered index per table, because
the data rows themselves can be sorted in only one order.
• The only time the data rows in a table are stored in sorted order is
when the table contains a clustered index. When a table has a
clustered index, the table is called a clustered table. If a table has no
clustered index, its data rows are stored in an unordered structure
called a heap.
4.2 Non-Clustered
As a non-clustered index is stored in a separate structure to the base table, it is possible to
create the non-clustered index on a different file group to the base table. So it can be
defined as:
• Non-Clustered indexes have a structure separate from the data rows. A
non-clustered index contains the non-clustered index key values and
each key value entry has a pointer to the data row that contains the
key value.
• The pointer from an index row in a non-clustered index to a data row is
called a row locator. The structure of the row locator depends on
whether the data pages are stored in a heap or a clustered table. For a
heap, a row locator is a pointer to the row. For a clustered table, the
row locator is the clustered index key.
• You can add nonkey columns to the leaf level of the Non-Clustered
index to by-pass existing index key limits, 900 bytes and 16 key
columns, and execute fully covered, indexed, queries.
More information about indexes can be found at this link.
Both clustered and non-clustered indexes can be unique. This means no two rows can
have the same value for the index key. Otherwise, the index is not unique and multiple
rows can share the same key value.
Note: Indexes are automatically maintained for a table or view whenever the table data
is modified.
5. Uniqueness
An index can be defined either as unique or non-unique. A unique index ensures that the
data contained within the unique index columns appear only once within the table,
including “NULL”. A unique index is commonly implemented to support the constraints.
SQL Server automatically enforces the uniqueness of the columns contained within a
unique index. If an attempt is made to INSERT a value/data that already exists in the
table, then an error will be generated by the SQL Server and finally the attempt to
INSERT the data will fail.
A non-unique index is also applicable as there can be duplicate data; a non-unique index
has more overhead than a unique index when retrieving data.
6. Creating a Table
What is a table? The foundation of every Relational Database Management System is a
database object called table. Every database consists of one or more tables, which stores
the database’s data/information. Each table has its own unique name and consists of
columns and rows.
Syntax of Creating Table
Collapse

CREATE TABLE
[ database_name.[ owner ] . | owner. ] table_name
( { < column_definition >
| column_name AS computed_column_expression
| < table_constraint > } [ ,...n ]
)
In this article, we will not discuss database tables. I hope that every one knows the basic
concepts about database tables.
More information about database tables can be found at:
• SQL Database Table
• Create Table
7. Creating an Index
As we discuss what an index is, why we use an index, types of indexes, etc, we are going
to discuss how to create an index. There are two ways of creating an index they are as
follows:
• Creating an Index using SQL Server Table Designer
• Creating an Index using Transact-SQL
7.1 Creating an Index using by SQL Server Table Designer
SQL Server Table designer is an excellent feature to manage various tables designing
creation, modification, indexing and so much more. Here you need to follow the step(s)
below to create an index using the SQL Table designer.
Step(s)
1. Open your SQL Server Enterprise Management Studio and choose your
database for creating a table index. Now select your desired table and
open the Table Design window. The following figure shows how to do
this.

Figure 1 (How to open SQL Table Designer)

2. A window will appear where you will find all the available inputs for
creating a Table. You just need to input the columns name, data type
length and also you may set the columns to allow null value or not.
Note that you can set a default value of a column. The following figure
will show you how you can perform all of this:
Figure 2 (How to set table columns, data type, length, etc.)

3. Well, now you know how to create a table. Let's see how to set an
index in a table. Select the column by clicking your mouse button, a
new popup menu will appear, select/click the Indexes/Keys for opening
a new window where you can configure the columns for indexing. The
following figure will show how to set an index.

Figure 2.1 (A) (How to configure an Index)

Figure 2.1 (B) (How to Configure an Index)


4. Now you just select the column from the general properties as shown
in figure 3, and add the specify column short order of the index.

Figure 4 (How to set a Clustered Index)

You can configure the index as clustered or non-clustered from the Create as
clustered properties. Figure 4 shows the configuration of clustered or non-
clustered indexes by default.
So we discussed how to create an index by using SQL Server Table Designer. Let’s try to
create an index by using Transact-SQL.
7.2 Creating an Index – Transact-SQL
If we want to create an index by using Transact – SQL , we must know the columns
detail for index creation. A sample syntax is given below.
Syntax
Collapse

CREATE INDEX <index_type> <index_name> ON <table_name> (


<column_name1> <index_order>,
<column_name2> <index_order>,
)

CREATE UNIQUE INDEX <index_type> <index_name> ON <table_name> (


<column_name1> <index_order>,
<column_name2> <index_order>,
)
7.3 Drop an Index
Removes one or more indexes from the current database.
The DROP INDEX statement does not apply to indexes created by defining PRIMARY KEY
or UNIQUE constraints (created by using the PRIMARY KEY or UNIQUE options of either
the CREATE TABLE or ALTER TABLE statements, respectively). For more information
about PRIMARY or UNIQUE KEY constraints, see "CREATE TABLE" or "ALTER TABLE" in
this volume.
Syntax
Collapse

DROP INDEX 'table.index | view.index' [ ,...n ]


More information about drop indexes can be found at this link.
8. Index and Statistics
When retrieving data, SQL Server obviously has to make some decisions as to the best
way to get to data and return it to the query requesting it. So SQL Server has some basic
information to make sensible and accurate choices. This is where statistics comes in. SQL
Server keeps statistics on each column, which are updated over a period of time and over
a number of inserts or modifications.
More information about indexes and statistics can be found at this link.
9. Summary
In this article, I tried to cover SQL table indexing. I discussed why we use indexes and
how they are used to quick and efficiently retrieve the data stored in the table. I also
discussed various types of indexes, how to create / drop index, index uniqueness and
index statistics as well.
I hope that this article will be helpful to you. Enjoy!
10. References
• SQL Server books online
• Microsoft Development Network (MSDN)
• SQL Server programming by Robin
• http://www.infogoal.com/
• http://www.developer.com/

11. History
• 16th August, 2009: Initial post
• 26th August, 2009: Reformation

License
This article, along with any associated source code and files, is licensed under The Code
Project Open License (CPOL)
Bottom of Form
Microsoft SQL Server 2005 Product Overview
Published: April 1, 2005

By Michelle Dumler

Summary: This paper provides an overview of the new benefits and functionality
available in SQL Server 2005.
On This Page
Introduction
Microsoft SQL Server 2005 Overview
What’s New in SQL Server 2005
Windows Server System Common Engineering Roadmap
Introduction
Organizations today face numerous data challenges; for example, the need for faster and
more data-driven decisions, the need to increase the productivity and flexibility of
development staff, and pressure to reduce overall Information Technology budgets while
at the same time scaling the infrastructure to meet ever-increasing demands.
The next release of Microsoft® SQL Server™ is designed to help enterprises address
these challenges. Microsoft SQL Server 2005 is a next-generation data management and
analysis solution that delivers increased security, scalability, and availability to enterprise
data and analytical applications, while making them easier to build, deploy, and manage.
Building on the strengths of SQL Server 2000, SQL Server 2005 provides an integrated
data management and analysis solution that will help organizations of any size to:
• Build, deploy, and manage enterprise applications that are more secure, scalable,
and reliable.
• Maximize Information Technology productivity by reducing the complexity of
building, deploying, and managing database applications.
• Share data across multiple platforms, applications, and devices to make it easier to
connect internal and external systems.
• Control costs without sacrificing performance, availability, scalability, or security.
Read on to learn more about SQL Server 2005 advancements in three key areas:
enterprise data management, developer productivity, and business intelligence as well
pricing and licensing, upgrading to SQL Server 2005, and the Microsoft Windows Server
System™.
Top Of Page

Microsoft SQL Server 2005 Overview


SQL Server Data Platform
SQL Server is a comprehensive, integrated end-to-end data solution that empowers users
across your organization by providing them with a secure, reliable, and productive
platform for enterprise data and business intelligence (BI) applications. SQL Server 2005
delivers powerful, familiar tools to Information Technology professionals as well as to
information workers, reducing the complexity of creating, deploying, managing, and
using enterprise data and analytical applications on platforms ranging from mobile
devices to enterprise data systems. Through a comprehensive feature set, interoperability
with existing systems, and automation of routine tasks, SQL Server 2005 provides a
complete data solution for enterprises of all sizes. Figure 1 shows the layout of the SQL
Server 2005 data platform.

Figure 1: The SQL Server 2005 Data Platform

The SQL Server data platform includes the following tools:


• Relational database: Secure, reliable, scalable, highly available relational
database engine with improved performance and support for structured and
unstructured (XML) data.
• Replication Services: Data replication for distributed or mobile data processing
applications, high systems availability, scalable concurrency with secondary data
stores for enterprise reporting solutions, and integration with heterogeneous
systems, including existing Oracle databases.
• Notification Services: Advanced notification capabilities for the development and
deployment of scalable applications that can deliver personalized, timely
information updates to a variety of connected and mobile devices.
• Integration Services: Extract, transform, and load capabilities for data
warehousing and enterprise-wide data integration
• Analysis Services: Online analytical processing (OLAP) capabilities for the rapid,
sophisticated analysis of large and complex datasets using multidimensional
storage.
• Reporting Services: A comprehensive solution for creating, managing, and
delivering both traditional, paper-oriented reports and interactive, Web-based
reports.
• Management tools: SQL Server includes integrated management tools for
advanced database management and tuning as well as tight integration with tools
such as Microsoft Operations Manager (MOM) and Microsoft Systems
Management Server (SMS). Standard data access protocols drastically reduce the
time it takes to integrate data in SQL Server with existing systems. In addition,
native Web service support is built into SQL Server to ensure interoperability with
other applications and platforms.
• Development tools: SQL Server offers integrated development tools for the
database engine, data extraction, transformation, and loading (ETL), data mining,
OLAP, and reporting that are tightly integrated with Microsoft Visual Studio® to
provide end-to-end application development capabilities. Every major subsystem
in SQL Server ships with it’s own object model and set of APIs to extend the data
system in any direction that is unique to your business.
The SQL Server 2005 data platform provides organizations of all sizes with the following
benefits:
• Leverage data assets: In addition to delivering a secure, reliable database for
line-of-business and analytical applications, SQL Server 2005 enables customers
to get more value from their data by including embedded functionality such as
reporting, analysis, and data mining.
• Increase productivity: Through comprehensive business intelligence capabilities
and integration with familiar tools such as the Microsoft Office System, SQL
Server 2005 provides information workers across your organization with critical,
timely business information that is tailored to their specific needs. The goal is to
extend BI to all users within an organization and ultimately to allow users at all
levels of the organization to make better business decisions based on one of their
most valuable assets—their data.
• Reduce Information Technology complexity: SQL Server 2005 simplifies the
development, deployment, and management of line-of-business and analytical
applications by providing a flexible development environment for developers and
integrated, automated management tools for database administrators.
• Lower total cost of ownership (TCO): The integrated approach and focus on
ease-of-use and deployment provides the industry’s lowest upfront,
implementation, and maintenance costs for rapid return on your database
investment.
Top Of Page

What’s New in SQL Server 2005


Enterprise Data Management
In today’s connected world, data and the systems that manage that data must always be
secure yet available to your users. With SQL Server 2005, users and Information
Technology professionals across your organization will benefit from reduced application
downtime, increased scalability and performance, and tight yet flexible security controls.
SQL Server 2005 also includes many new and improved capabilities to help make your
Information Technology staff more productive. SQL Server 2005 includes key
enhancements to enterprise data management in the following areas:
• Manageability
• Availability
• Scalability
• Security
Manageability
SQL Server 2005 makes it simpler and easier to deploy, manage, and optimize enterprise
data and analytical applications. As an enterprise data management platform, it provides a
single management console that enables data administrators anywhere in your
organization to monitor, manage, and tune all of the databases and associated services
across your enterprise. It provides an extensible management infrastructure that can be
easily programmed using SQL Management Objects (SMO), enabling users to customize
and extend their management environment and Independent Software Vendors (ISVs) to
build additional tools and functionality to further extend the capabilities that come out of
the box.
SQL Server Management Studio
SQL Server 2005 simplifies management by providing one integrated management
console to monitor and manage the SQL Server relational database, as well as Integration
Services, Analysis Services, Reporting Services, Notification Services, and SQL Mobile
across large numbers of distributed servers and databases. Database administrators can
perform several tasks at the same time including: authoring and executing a query,
viewing server objects, managing an object, monitoring system activity, and viewing
online help. SQL Server Management Studio hosts a development environment for
authoring, editing and managing scripts and stored procedures using Transact-SQL,
Multidimensional Expressions (MDX), XMLA, and SQL Server Mobile Edition.
Management Studio is readily integrated with source control. Management Studio also
hosts tools for scheduling SQL Server Agent jobs and managing maintenance plans to
automate daily maintenance and operation tasks. The integration of management and
authoring in a single tool coupled with the ability to manage all types of servers provides
enhanced productivity for database administrators.
“We have thousands of stored procedures, and with SQL Server 2000 I used to have
to use a separate tool to check out code, and then open the query analyzer to edit the
code. With SQL Server 2005 all of this is integrated with Management Studio. I’m
able to accomplish routine tasks 20 percent faster using Management Studio.”
--Joyce Behrendt, Senior Development Manager, Information Technology
Corporate Strategy Planning and Analysis, Microsoft
Proactive Performance Monitoring and Performance Tuning
SQL Server 2005 exposes more than 70 new measures of internal database performance
and resource usage from memory, locking, and scheduling to transactions and network
and disk I/O. These Dynamic Management Views (DMVs) provide greater transparency
and visibility into the database and a powerful infrastructure for proactive monitoring of
database health and performance.
SQL Management Objects
SQL Management Objects (SMO) is a new set of programming objects that exposes all of
the management functionality of the SQL Server database. In fact, Management Studio
was built with SQL Management Objects. SMO is implemented as a Microsoft .NET
Framework assembly. You can use SMO to automate common SQL Server
administrative tasks, such as programmatically retrieving configuration settings, creating
new databases, applying Transact-SQL scripts, creating SQL Server Agent jobs, and
scheduling backups. The SMO object model is a more secure, reliable, and scalable
replacement for Distributed Management Objects (DMO), which was included with
earlier versions of SQL Server.
Availability
Investments in high availability technologies, additional backup and restore capabilities,
and replication enhancements will enable enterprises to build and deploy highly available
applications. Innovative high availability features such as; database mirroring, failover
clustering, database snapshots, and enhanced online operations will minimize downtime
and help to ensure that critical enterprise systems remain accessible. We will review these
enhancements in greater detail in this section.
Database Mirroring
Database mirroring allows continuous streaming of the transaction log from a source
server to a single destination server. In the event of a failure of the primary system,
applications can immediately reconnect to the database on the secondary server. The
secondary instance detects failure of the primary server within seconds and accepts
database connections immediately. Database mirroring works on standard server
hardware and requires no special storage or controllers. Figure 2 shows the basic
configuration of database mirroring.

Figure 2: Basic Configuration of Database Mirroring

Failover Clustering
Failover clustering is a high availability solution that exploits Microsoft Windows®
Clustering Services to create fault-tolerant virtual servers that provide fast failover in the
event of a database server failure. In SQL Server 2005, support for failover clustering has
been extended to SQL Server Analysis Services, Notification Services, and SQL Server
replication. The maximum number of cluster nodes has been increased to eight. SQL
Server failover clustering is now a complete fault-tolerant server solution.
Availability Feature Database Mirroring Failover Clustering
Automatic Failover Yes Yes
Transparent Client Redirection Yes, auto-redirect Yes, reconnect to same IP
Impact on Overall Throughput No impact to minimal No impact
Zero Work Loss Yes Yes
Requires Certified Hardware No Yes
Provides Redundant Data Yes No

Database Snapshots
SQL Server 2005 introduces the ability for database administrators to create instant, read-
only views of a database. The database snapshot provides a stable view without the time
or storage overhead of creating a complete copy of the database. As the primary database
diverges from the snapshot, the snapshot adds its own copy of pages as they are modified.
Thus the snapshot may be used to quickly recover from an accidental change to a
database by simply reapplying the original pages from the snapshot to the primary
database.
Fast Recovery
SQL Server 2005 improves the availability of SQL Server databases with a new faster
recovery option. Users can reconnect to a recovering database after the transaction log
has been rolled forward. Earlier versions of SQL Server required users to wait until
incomplete transactions had rolled back, even if the users did not need to access the
affected parts of the database.
Dedicated Administrator Connection
SQL Server 2005 introduces a dedicated administrator connection to access a running
server even if the server is not responding or is otherwise unavailable. This allows you to
execute diagnostic functions or Transact-SQL statements in order to troubleshoot
problems on a server. The connection is activated by members of the sysadmin fixed
server role and is only available through the SQLCMD command prompt utility either
locally, or from a remote machine.
Online Operations (index operations and restore)
The ability to create, rebuild, or drop an index online is an enhanced feature of SQL
Server 2005 that augments the indexing capabilities of earlier versions of SQL Server.
The online index option allows concurrent modifications (updates, deletes, and inserts) to
the underlying table or clustered index data and any associated indexes during index data
definition language (DDL) execution. With support for online index operations, you can
add indexes without interfering with access to tables or other existing indexes.
Additionally, the server workload allows index operations to take advantage of parallel
processing
SQL Server 2005 also introduces the ability to perform a restore operation while an
instance of SQL Server is running. Online restoration capabilities improve the availability
of SQL Server because only the data that is being restored is unavailable. The rest of the
database remains online and available. Earlier versions of SQL Server require that you
bring a database offline before you restore the database.
Replication
Replication is designed to increase data availability by distributing the data across
multiple database servers. Availability is increased by allowing applications to scale out
the SQL Server read workload across databases. SQL Server 2005 offers enhanced
replication using a new peer-to-peer model that provides a new topology in which
databases can be synchronized transactionally with any identical peer database.
Scalability
Scalability advancements such as table partitioning, snapshot isolation, and 64-bit support
will enable you to build and deploy your most demanding applications using SQL Server
2005. The partitioning of large tables and indexes significantly enhances query
performance against very large databases.
Table and Index Partitioning
Table and index partitioning eases the management of large databases by facilitating the
management of the database in smaller, more manageable chunks. While the concept of
partitioning data across tables, databases, and servers is not new to the world of
databases, SQL Server 2005 provides a new capability for the partitioning of tables
across filegroups in a database. Horizontal partitioning allows for the division of a table
into smaller groupings based on a partitioning scheme. Table partitioning is designed for
very large databases, from hundreds of gigabytes to terabytes and beyond.
Snapshot Isolation
Once data is copied, transformed, and archived to an analysis-oriented database it must
be maintained and/or rebuilt periodically. Users certainly benefit from looking at a
transactionally consistent version of the database; however, the version of the data that
they are viewing is no longer current. It can take many hours to build and index the and
that might not be what the user really needs. This is where snapshot isolation comes in.
The snapshot isolation level allows users to access the last row that was committed, by
using a transactionally consistent view of the database. This new isolation level provides
the following benefits:
• Increased data availability for read-only applications.
• Nonblocking read operations allowed in an OLTP environment.
• Automatic mandatory conflict detection for write transactions.
• Simplified migration of applications from Oracle to SQL Server.
Replication Monitor
Replication Monitor is a tool that sets a new standard for ease of use in managing
complex data replication operations with its intuitive user interface and wealth of data
metrics.
Support for 64-Bit System Itanium2 and x64
Optimized for the Intel Itanium processor, SQL Server (64-bit) takes advantage of
advanced memory addressing capabilities for essential resources such as buffer pools,
caches, and sort heaps, reducing the need to perform multiple I/O operations to bring data
in and out of memory from disk. Greater processing capacity without the penalties of I/O
latency opens the door to new levels of application scalability.
Windows Server™ 2003 x64 provides high performance for both 32-bit and 64-bit
applications on the same system. The underlying architecture is based 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 more data per clock cycle, allows greater
access to memory, and speeds numeric calculations. The end result is a platform that
leverages the existing wealth of 32-bit applications while also providing a smooth
migration path to 64-bit computing.
Security
SQL Server 2005 makes significant enhancements to the security model of the database
platform, with the intention of providing more precise and flexible control to enable
tighter security of the data. A considerable investment has been made in a number of
features to provide a high level of security for your enterprise data including:
• Enforcing policies for SQL Server login passwords in the authentication space.
• Providing for more granularity in terms of specifying permissions at various
scopes in the authorization space.
• Allowing for the separation of owners and schemas in the security management
space.
Authorization
A new security model in SQL Server 2005 allows administrators to manage permissions
at a granular level and at a designated scope, making management of permissions easier
as well as ensuring that the principle of least privileges is upheld. SQL Server 2005
allows you to specify a context under which statements in a module execute. This feature
also acts as an excellent mechanism for granular permission management.
Authentication
SQL Server 2005 clustering supports Kerberos authentication against a SQL Server 2005
virtual server. Administrators can specify Microsoft Windows-style policies on standard
logins so that a consistent policy is applied across all accounts in the domain.
Native Encryption
SQL Server 2005 supports encryption capabilities within the database itself, fully
integrated with a key management infrastructure. By default, client/server
communications are encrypted. To centralize security assurance, server policy can be
defined to reject unencrypted communications.
SQL and Trustworthy Computing
The Trustworthy Computing initiative outlines a framework that defines the steps
necessary to support secure computing as well as measures that help you deploy and
maintain a secure environment. These steps help to protect the confidentiality, integrity,
and availability of data and systems at every phase of the software life cycle—from
design, to delivery, to maintenance. To uphold the four tenets of the Trustworthy
Computing initiative, Microsoft and the SQL Server team have taken the following steps:
• Secure by design. The SQL Server development team conducted multiple security
audits and spent more than two months studying SQL Server components and the
interaction between them. For each potential security threat, the team did a threat
analysis to evaluate the issue and completed additional design and testing work to
neutralize potential security issues. As a result of these design efforts, SQL Server
2005 includes many new server security features.
• Secure by default. Upon installation, SQL Server 2005 chooses the right set of
configuration values for all setup options, ensuring that when a new system is
installed, it will be in a secure state by default.
• Secure in deployment. Microsoft has created content to help organizations deploy
SQL Server using the proper security credentials and to fully understand the steps
and permissions required. SQL Server deployment tools provide the information
necessary to understand the decisions you need to make during deployment.
Security updates are easy to find and install—and if you choose the option, the
updates install automatically. Tools are also available to help you assess and
manage security risks across organizations.
Developer Productivity
SQL Server 2005 includes many new technologies that bring significant increases in
developer productivity. From .NET Framework support to tight integration with Visual
Studio®, these features provide developers with the ability to more easily create secure,
robust database applications at a lower cost. SQL Server 2005 enables developers to
leverage existing skills across a variety of development languages while providing an
end-to-end development environment for the database. Native XML capabilities will also
allow developers to build new classes of connected applications across any platform or
device.
Enhancements for developer productivity include:
• Expanded language support
• Improved development tools
• Extensibility
• Improved data access
• XML and Web services
• Application Framework
Expanded Language Support
Because the common language runtime (CLR) is hosted in the database engine,
developers can choose from a variety of familiar languages to develop database
applications, including Transact-SQL, Microsoft Visual Basic® .NET, and Microsoft
Visual C#® .NET. Additionally, CLR hosting will provide developers with increased
flexibility through the use of user-defined types and functions. The CLR will also provide
opportunities to use third-party code for rapid database application development.
CLR/.NET Framework integration
With the release of Microsoft SQL Server 2005, database programmers can now take full
advantage of the Microsoft .NET Framework class library and modern programming
languages to implement functionality within the server. Using common language runtime
(CLR) integration, you can code your stored procedures, functions, and triggers in the
.NET Framework language of your choice. Microsoft Visual Basic .NET and the C#
programming language both offer object-oriented constructs, structured exception
handling, arrays, namespaces, and classes. In addition, the .NET Framework provides
thousands of classes and methods that have extensive built-in capabilities that you can
easily use on the server-side. Many tasks that were awkward or difficult to perform in
Transact-SQL can be better accomplished by using managed code; additionally, two new
types of database objects—aggregates and user-defined types—are available. You can
now better use the knowledge and skills that you have already acquired to write in-
process code. In short, SQL Server 2005 enables you to extend the database server to
more easily perform appropriate computation and operations on the back end.
This integration between SQL Server and the CLR provides several major benefits:
• Enhanced programming model: Programming languages that are compatible
with the .NET Framework are in many respects richer than Transact-SQL, offering
constructs and capabilities that were previously not available to SQL developers.
• Enhanced safety and security: Managed code runs in a CLR environment, hosted
by the database engine. This allows .NET Framework database objects to be safer
and more secure than the extended stored procedures available in earlier versions
of SQL Server.
• User-defined types and aggregates: Two new database objects that expand the
storage and querying capabilities of SQL Server are enabled by hosting the CLR.
• Common development environment: Database development is integrated into
the Microsoft Visual Studio 2005 development environment. You can use the
same tools for developing and debugging database objects and scripts that you use
to write middle-tier or client-tier .NET Framework components and services.
• Performance and scalability: Because managed code compiles to native code
prior to execution, you can achieve significant performance increases in some
scenarios.
By using languages such as Visual Basic .NET and C#, you can capitalize on CLR
integration to write code that has more complex logic and is more suited for computation
tasks. In addition, Visual Basic .NET and C# offer object-oriented capabilities such as
encapsulation, inheritance, and polymorphism. You can easily organize related code into
classes and namespaces, which means that you can more easily organize and maintain
your code investments when you are working with large amounts of code. The ability to
logically and physically organize code into assemblies and namespaces is a huge benefit,
that allows you to better find and relate different pieces of code in a large database
implementation.
Managed code is more efficient than Transact-SQL at processing numbers and managing
complicated execution logic, and provides extensive support for string handling, regular
expressions, and so on. Also, with the functionality that is available in the .NET
Framework class library, you have full access to thousands of pre-built classes and
routines that you can access easily from any stored procedure, trigger, or user-defined
function. Everything from improved string-handling functions, math functions, date
operations, access to system resources, advanced encryption algorithms, file access,
image processing, and XML data manipulation is easily accessible from managed stored
procedures, functions, triggers, and aggregates.
One of the major benefits of managed code is type safety. Before managed code is
executed, the CLR performs several checks through a process known as verification to
ensure that the code is safe to run. For example, the code is checked to ensure that
memory is not read that has not been written to.
Transact-SQL enhancements
Transact-SQL has long been the basis for all programmability of SQL Server. SQL
Server 2005 provides many new language capabilities for developing scalable database
applications. These enhancements include error handling, new recursive query
capabilities, and support for new SQL Server Database Engine capabilities. Transact-
SQL enhancements in SQL Server 2005 increase your expressive powers in query
writing, allowing you to improve the performance of your code and extend your error
management capabilities. The continuous effort that is being put into enhancing Transact-
SQL shows a firm belief in its significant role in SQL Server.
Improved Development Tools
Developers will be able to use one development tool for Transact-SQL, XML,
Multidimensional Expressions (MDX), and XML for Analysis (XML/A). Integration
with the Visual Studio development environment will provide more efficient
development and debugging of line-of-business and business intelligence (BI)
applications.
Business Intelligence Development Studio
The Business Intelligence Development Studio is a common development environment
for building BI solutions based on Visual Studio including a database engine, analysis
services, and reporting services. Use the Business Intelligence Development Studio
graphical user interface to design SQL Server Integration Services (SSIS) packages for
data management applications. SSIS packages are designed, developed, and debugged in
the Business Intelligence Development Studio by dragging tasks from the toolbox, setting
their properties, and connecting tasks with precedence constraints. Figure 3 shows the
interface in Visual Studio for the Business Intelligence Development Studio.

Figure 3: Business Intelligence Development Studio interface in


Visual Studio

Visual Studio Integration


SQL Server 2005 and Visual Studio 2005 together provide deeper levels of integration
between the database and the application development environment than ever before.
Developers now have the ability to create CLR stored procedures, functions, user-defined
types, and user-defined aggregates directly from within the Visual Studio development
environment. They can deploy these new database objects directly from Visual Studio
without having to switch tools. Visual Studio 2005 supports all of the new SQL Server
data types, such as native XML directly. You can also add your CLR database objects to
the same source control system that you use for all you Visual Studio projects, thus
providing an even greater level of integration and security to your development
processes.
Cross-Tier and Cross-Language Debugging
SQL Server 2005 and Visual Studio 2005 together provide even deeper integration in the
area of application debugging. The combination allows you to seamlessly debug both
CLR and Transact-SQL code using the same Visual Studio debugging interface and it
allows you to debug from CLR to Transact-SQL and back again, regardless of the
location of the code, whether it is on the developer machine or stored in the SQL Server
database.
Extensibility

User-Defined Types and Aggregates


User-defined types in SQL Server 2005 are not an object relational extensibility
mechanism. They are a way to extend the scalar type system of the database. The scalar
type system includes the columnar types that ship with SQL Server (types like int,
nvarchar, uniqueidentifier, etc.). With user-defined types, you can define your own
type that can be used for column definitions, for example. Create a user-defined type if
your type really is an atomic value that is appropriate to be modeled as a column.
Use user-defined types if you need to define your own scalar type. Example scenarios for
such types include custom date/time data types in various calendars, and currency data
types. With user-defined types, you can create a single object that exposes all the
behaviors that are available on the type, and encapsulate, or hide, the underlying data that
is stored by the type. Everyone that needs to access the data has to use the user defined
type programmatic interface. If you can leverage existing functionality in the .NET
Framework (such as the internationalization or calendar functionality), that is another
really good reason to consider implementing your type as a user-defined type.
There are a number of scenarios where you may need to perform aggregations over data.
This includes performing statistical calculations, such as avg, stddev, etc. If the desired
aggregation function is not directly supported as a built-in aggregate function, there are
three ways to perform a custom aggregation in SQL Server 2005:
• Write the aggregation as a user-defined aggregate.
• Write the aggregate using a CLR stored procedure.
• Use a server-side cursor
SQL Management Objects(SMO)
SQL Management Objects (SMO) is the management object model for SQL Server 2005.
SMO represents significant design and architectural improvements for the SQL Server
management object model. It is a simple to use but rich object model that is based on
.NET Framework managed code. SMO is the primary tool for developing database
management applications using .NET Framework. SMO is used by every dialog box in
SQL Server Management Studio, and every administrative action that you can perform in
SQL Server Management Studio you can also accomplish by using SMO.
The new SMO object model and the Microsoft Windows Management Instrumentation
(WMI) APIs replace SQL-DMO. Where possible, SMO incorporates similar objects as
SQL-DMO for ease of use. You can still use SQL Server 2005 with SQL-DMO, but
SQL-DMO will not be updated to manage features that are specific to SQL Server 2005.
Analysis Management Objects
Analysis Management Objects (AMO) allows client applications to access the range of
administrative commands and capabilities available to Analysis Services using an object
library that can provide object-level validation capabilities, instead of having to manually
generate DDL scripts for Analysis Services commands and the often-lengthy contents of
the Analysis Services Scripting Language (ASSL) ObjectDefinition element.
Applications using AMO can either connect and work directly with objects on an
Analysis Services instance, or create such objects without an existing connection and
persist the metadata for later deployment. AMO also “wraps” ASSL commands and
elements.
Improved Data Access and Web Services
In SQL Server 2005, you can develop XML Web services in the database tier, making
SQL Server an HTTP listener. This provides a new type of data access capability for
applications that are centralized around Web services. In SQL Server 2005 you can use
HTTP to access SQL Server directly, without using a middle-tier listener such as
Microsoft Internet Information Services (IIS). SQL Server exposes a Web service
interface, to allow the execution of SQL statements and invocation of functions and
procedures. Query results are returned in XML format and can take advantage of the Web
services infrastructure of Visual Studio.
ADO.NET 2.0/ADOMD.NET
There is much that's new in the next version of ADO.NET. From new support for query
change notifications, to Multiple Active Result Sets (MARS), ADO.NET evolves dataset
access and manipulation to achieve greater scalability and flexibility.
Query notification
SQL Server 2005 introduces notification support for SQL Server queries. You can use
this support to send a command to SQL Server and to request that a notification be
generated if executing the same command again produces different results from those
obtained initially. You accomplish this by using a dependency object that detects when
the underlying data is changed. Commands that are sent to the server through any of the
client APIs such as ADO.NET, OLE DB, Open Database Connectivity (ODBC),
Microsoft ActiveX® Data Objects (ADO), or SOAP may include a tag that requires a
notification. For each statement that is executed as part of the request, the server creates a
notification subscription that fires once for each statement that is included in the request.
Notifications are delivered through a SQL Service Broker queue that applications can
poll, and use activation services or blocking statements that return whenever the
notifications are available. Query notifications are useful for enabling the caching of
results in applications such as database-driven Web sites. Figure 4 shows the query
notification process.

Figure 4: Query notification

MARS
MARS provides the ability to have more than one pending request per connection, in
particular to have more than one default result set open per connection. Default result sets
are forward-only read-only result sets. For default result sets, the client drivers
transparently retrieve the data in large chunks (Tabular Data Stream buffer sized chunks)
so that application requests are satisfied without a roundtrip to the server (as in the case
of server cursors). The application can use a simple row-at-a-time programming model
without compromising performance. The multiple active result sets feature removes the
current restriction in which an open default result set blocks the driver from sending
requests to the server until the entire result set is consumed.
Transparent failover for data mirroring
SQL Server 2005 supports a "hot spare" capability through database mirroring. If a SQL
Server instance fails, the work can be shifted over to the backup server automatically.
This requires an instance to witness the failover known as (not surprisingly) the witness
instance. Hot spare scenarios require that existing client connections must "know" to fail
over (establish a connection with the new server instance), as well. Client connections
that produce an error on the next attempted access and must be manually "failed over" by
client programming are suboptimal. SqlClient in ADO.NET 2.0 supports client failover
without special programming of the application program.
XML Support
Advancements such as native XML data type and XQuery help organizations to
seamlessly connect internal and external systems. SQL Server 2005 will support both
relational and XML data natively, so enterprises can store, manage, and analyze data in
the format that best suits their needs. Support for existing and emerging open standards
such as Hypertext Transfer Protocol (HTTP), XML, Simple Object Access Protocol
(SOAP), XQuery, and XML Schema definition language (XSD) will also facilitate
communication across extended enterprise systems.
XML Data Type
XML can model complex data; it is not limited to the scalar types that are supported by
SQL Server. As such, a string-based, built-in data type such as char or varchar does not
suffice to make full and effective use of the power and the numerous advantages of XML.
For example, if XML is stored as a string, you can insert or select an entire document, or
even retrieve contiguous bytes from it, but you cannot query into the contents of the
document itself. By providing the XML data type, SQL Server 2005 allows you to query
portions of an XML document, validate that the document conforms to an XML schema,
and even modify the contents of the XML document in place. It also integrates
traditional, relational data with data in unstructured or semi-structured XML documents
in ways that are not possible with SQL Server 2000. In SQL Server 2005, XML data is
stored as binary large objects (BLOBs) in an internal representation that allows efficient
reparsing and some compression.
A collection of XML schemas can be associated with a column of type XML. This
provides validation for constraints, inserts, and updates, and typing of values inside
stored XML data, as well as optimizations for storage and query processing. SQL Server
2005 also provides several DDL statements for managing schemas on the server.
XQuery
The XML Query Language, or XQuery, is an intelligent and robust language that is
optimized for querying all types of XML data. With XQuery you can run queries against
variables and columns of the XML data type using the latter's associated methods. As
with many of the XML standards, the World Wide Web Consortium (W3C) oversees the
development of XQuery. XQuery evolved from a query language called Quilt, which was
itself based on a variety of other query languages such as the XML Path Language
(XPath) version 1.0, XQL, and SQL. It also contains XPath 2.0 as a subset. Therefore, if
you have experience using XPath 1.0, you can capitalize on your skills and do not have to
learn an entirely new query language. There are, however, significant enhancements that
go beyond XPath 1.0, such as typing, special functions, and support for better iteration,
sorting of results, and construction.
SQL Server 2005 ships with deep XQuery capabilities that allow for XML object
manipulation in the data tier. It supports a statically typed subset of the XQuery 1.0
Working Draft of November 15, 2003.
Web Services Support
In SQL Server 2005, you can develop XML Web services in the database tier, making
SQL Server an HTTP listener. This provides a new type of data access capability for
applications that are centralized around Web services. In SQL Server 2005, you can use
HTTP to access SQL Server directly without using a middle-tier listener such as
Microsoft Internet Information Services (IIS). SQL Server exposes a Web service
interface to allow the execution of SQL statements and invocation of functions and
procedures. Query results are returned in XML format and can take advantage of the Web
services infrastructure of Visual Studio.
XML for Analysis Services (XML/A)
XML for Analysis Services (XML/A) is the native, standards-based protocol for
communicating with the Analysis Services server. New kinds of applications are enabled
and easy to develop—applications that integrate analytics with operations in real time.
With XML/A as the native protocol, Analysis Services clients can be configured to have
a zero footprint, and each server is automatically a Web service. A light-footprint Win32
layer is available for backward compatibility with tools that work with Analysis Services
2000 on OLE DB for OLAP, ADOMD, and ADOMD.NET. Many users will continue to
use the ADOMD.NET object model to build custom applications on Analysis Services.
Application Framework
SQL Server 2005 introduces a new SQL Server application framework including: Service
Broker, Notification Services, SQL Server Mobile, and SQL Server Express. Service
Broker is a distributed application framework that provides reliable asynchronous
messaging at the database to database level.
Service Broker
Over the last 10 years, the proliferation of e-commerce applications has created the need
for increased workflow management across database applications. When an online
customer places an order for a book, this order needs to commit transactions into the
inventory, shipping, and credit card systems, and also needs to send an order
confirmation using another Web application. Waiting for each of these processes to
happen in order doesn't scale well. SQL Server 2005 provides a new scalable architecture
for building asynchronous message routing. Figure 5 outlines the Service Broker
architecture.
Figure 5: Service Broker architecture

The Service Broker technology allows internal or external processes to send and receive
streams of reliable, asynchronous messages by using extensions to normal Transact-SQL
data manipulation language. Messages are sent to a queue in the same database as the
sender, to another database in the same instance of SQL Server, or to another instance of
SQL Server either on the same server or on a remote server.
“SQL Service Broker in SQL Server 2005 has made development 60 percent faster
compared to writing SQL jobs.”--Ketan Patel, Senior Application Developer,
Information Technology Corporate Strategy Planning and Analysis, Microsoft
Notification Services
Microsoft SQL Server Notification Services is a platform for developing and deploying
applications that generate and send notifications to users. Notifications are personalized,
timely messages that can be sent to a wide variety of devices.
Notifications reflect the preferences of the subscriber. The subscriber enters a
subscription to express an interest in information. For example, "notify me when the
stock price of Adventure Works reaches $70.00," or "notify me when the strategy
document my team is writing is updated."
A notification can be generated and sent to the user as soon as a triggering event occurs,
or it can be generated and sent on a predetermined schedule that the user specifies. The
user's subscription specifies when the notification should be generated and sent.
Notifications can be sent to a wide variety of devices. For example, a notification can be
sent to a user's mobile phone, personal digital assistant (PDA), Microsoft Windows
Messenger, or e-mail account. Because these devices often accompany the user,
notifications are ideal for sending high-priority information.
SQL Server Mobile Edition
SQL Server 2000 shipped with SQL Server 2000 Windows CE Edition, which is now
SQL Server Mobile Edition version 3.0. There are a number of new key features in SQL
Server Mobile Edition that relate to developers:
• You can create a SQL Server Mobile Edition database on the desktop or on the
device, directly from SQL Server Management Studio. You can also manipulate
the schema of the SQL Server Mobile Edition database directly from Management
Studio, regardless of whether the database resides on the mobile device or on the
desktop. You can use SQL Server Management Studio to run queries that target a
SQL Server Mobile Edition database on the device or on the desktop. You can
also take advantage of new SQL Server Mobile Edition features that include an
XML showplan rendered in a GUI format just like native SQL Server and the
ability to use query hints to override the query optimizer in SQL Server Mobile
Edition. For the first time, you can control the optimization plan on a device.
• You can now code against SQL Server Integration Services (SSIS) objects to
exchange data.
• The new SqlCeResult set is derived from the SQLResult set that is in SQL Server
2005. This allows SQL Server Mobile Edition to have a true scrollable, updateable
cursor. It also allows binding to data objects that are on devices.
• You can code an application to synchronize data while leaving the main
application open, and you can have two separate applications access the same
database on the device at the same time.
• You can get notifications that you can code into status bars that will give the status
of a synchronization. Previously, there was no way to know how far
synchronization status was, to notify users that a device had not stopped
responding.
• You can maintain the small size of the database through a much more aggressive
page reclamation policy.
• You can share parameterized query code with SQL Server syntax.
SQL Server Express
More than ever developers are leveraging relational databases to provide a rich end-user
experience. Protecting and managing information inside these applications is critical.
Microsoft SQL Server Express helps developers build robust and reliable applications by
providing a free, easy to use, and robust database. Too often database systems are overly
complex for building simple applications. Microsoft Visual Studio 2005 and SQL Server
Express reduce this complexity by providing a simple but powerful development
environment for building data-driven applications. Developers can design schemas, add
data, and query local databases, all inside the Visual Studio 2005 environment. If
developers need more advanced database features, then SQL Server Express can be
seamlessly upgraded to more sophisticated versions of SQL Server. Figure 6 shows the
Query Editor interface in SQL Server Express Manager.

Figure 6: The Query Editor in SQL Server Express Manager (XM)

A new GUI tool called SQL Server Express Manager (XM) is freely available as a
separate Web download. XM allows easy database management and query analysis
capabilities, will have a small download size, and will be freely redistributable. XM
supports connections to SQL Server Express and other SQL Server 2005 editions, SQL
Server 2000, and MSDE 2000. A simplified connection dialog box guides the user
through the selection of the instance and the authentication methods to be used. Both
local and remote connections are possible using XM. Object Explorer will enumerate and
display the common objects used, such as the instance, tables, stored process, etc., in a
hierarchical manner and will help the user visualize access to the database.
All database management functionalities are available by invoking the right-click context
menu from Object Explorer. Some of the database management options to be exposed
include creating and modifying databases, tables, logins, and users. Many of these
common database operations are available as task wizards that guide the user through the
process, while many others are available as tabbed window documents. For instance, XM
will provide a New/Edit Database document for creating new databases and editing
existing databases.
Many database users prefer to manage their servers using Transact-SQL, since this
approach offers finer-grained control than using the graphical user interface. The Query
Editor in XM will allow users to develop and execute Transact-SQL statements and
scripts. The Query Editor will have rich features such as keyword color-coding and a
results pane that returns results in a data grid. The error messages, if any, will also be
shown in the results pane.
Business Intelligence
SQL Server 2005 will further Microsoft’s leadership in the are of business intelligence
(BI) through innovations in scalability, data integration, development tools, and rich
analytics. SQL Server 2005 enables scalable business intelligence by putting critical,
timely information in the hands of employees across your organization. From the CEO to
the information worker, employees will be able to quickly and easily harness data to
make better decisions faster. The comprehensive integration, analysis, and reporting
capabilities of SQL Server 2005 enable companies to extend the value of their existing
applications, regardless of the underlying platform.
Business intelligence features include enhancements in the following areas:
• End-to-end integrated business intelligence platform
• Integration Services
• Analysis Services
• Reporting Services
• Integration with the Microsoft Office System
End-to-End Integrated Business Intelligence Platform
SQL Server 2005 is a complete business intelligence platform that provides the features,
tools, and functionality to build both classic and innovative kinds of analytical
applications. The following provides an introduction to the tools that you will use to build
an analytical application, and highlights new functionality that makes it easier than ever
to build and manage complex BI systems.
The SQL Server 2005 business intelligence toolset delivers end-to-end BI application
integration:
• Design: Business Intelligence Development Studio is the first integrated
development environment designed for the business intelligence developer. Built
on Visual Studio 2005, the Business Intelligence Development Studio delivers a
rich, integrated, professional development platform for BI system developers.
Debugging, source control, and script and code development are available for all
components of the BI platform.
• Integrate: SQL Server Integration Services (SSIS) has been rewritten to perform
complex data integration, transformation, and synthesis at high speed for very
large data volumes. The Business Intelligence Development Studio makes
building and debugging packages positively fun. Integration Services, Analysis
Services, and Reporting Services work together to present a seamless view of data
from heterogeneous sources.
• Analyze: Microsoft Data Mining has always been easy to use. Now it's even better
with the addition of important new algorithms, including Association Rules, Time
Series, Regression Trees, Sequence Clustering, Neural Network, and Naïve Bayes.
SQL Server 2005 blurs the lines between relational and multidimensional
databases. You can store data in the relational database, in the multidimensional
database, or use the new Proactive Cache feature to get the best of both worlds.
Important new analytical capabilities have been added to Analysis Services cubes
as well: these include Key Performance Indicator (KPI) framework, MDX scripts,
and other built-in advanced business analytics. The Reporting Services report
delivery and management framework enables easy distribution of complex
analytics to the widest possible audience.
• Report: Reporting Services extends the Microsoft business intelligence platform
to reach the business user who needs to consume the analysis. Reporting Services
is an enterprise managed reporting environment, embedded and managed via Web
services. Reports can be personalized and delivered in a variety of formats, with a
range of interactivity and printing options. Complex analyses can reach a broad
audience through the distribution of reports as a data source for downstream
business intelligence. New with SQL Server 2005 is the reporting tool, Report
Builder.
• Manage: SQL Server Management Studio integrates the management of all SQL
Server 2005 components. Business intelligence practitioners will benefit from
Microsoft's extension of the server abilities you expect from the relational engine
—scalability, reliability, availability, programmability, and so on—to the full set
of BI platform components.
Integration Services
SQL Server 2005 includes a redesigned enterprise ETL platform, called SQL Server
Integration Services (SSIS). SQL Server Integration Services enables organizations to
more easily integrate and analyze data from multiple heterogeneous information sources.
By analyzing data across a wide array of operational systems, organizations may gain a
competitive edge through a holistic understanding of their business.
Enterprise ETL Platform
This new platform is the successor to the popular feature in SQL Server 2000, called Data
Transformation Services (DTS). SSIS is completely new for SQL Server 2005. SSIS
provides the breadth of features, and very high scale performance that is necessary to
build enterprise-class ETL applications. SSIS is fully programmable, embeddable, and
extensible—characteristics that make it an ideal ETL platform.
Beyond Traditional ETL
SQL Server 2005 supports nontraditional data (Web Services, XML) out-of-the box
through:
• SSIS brings analytics to the data without persisting the data.
• Data Mining and text mining in the data flow.
• Data Mining and analytics are brought to the data flow for data quality and data
cleansing.
Analysis Services
With SQL Server 2005, Analysis Services provides, for the first time, a unified and
integrated view of all your business data as the foundation for all of your traditional
reporting, OLAP analysis, and data mining.
“The move to Analysis Services in SQL Server 2005 has been a huge benefit for our
operations. …We’re seeing at least a 75 percent reduction in OLAP cube processing
time.”--Mike McGrew, Development Manager, Information Technology Tax and
Audit Product Group, Microsoft
Unified Dimensional Model
By combining the best aspects of traditional OLAP analysis and relational reporting,
Analysis Services 2005 provides a metadata model that covers both sets of needs. A set
of cubes and dimensions defined in Analysis Services 2005 is referred to as a Unified
Dimensional Model (UDM). The UDM is a central metadata repository defining business
entities, business logic, calculations, and metrics that serves as the source for all reports,
spreadsheets, OLAP browsers, KPIs, and analytical applications.
Using the powerful new Data Source View feature, the UDM is mapped to a host of
heterogeneous back-end data sources allowing a complete and integrated picture of the
business regardless of the location of the data.
With the UDM’s friendly descriptions of the business entities, navigation hierarchies,
multiple perspectives, and even automatic translations to native languages, users will find
it easy to explore the corporate business data.
Data Mining
Microsoft SQL Server 2005 Data Mining is the business intelligence technology that
helps you build complex analytical models, and integrate those models with your
business operations. Microsoft SQL Server 2005 Analysis Services establishes new
ground for data mining. By creating an easy to use, extensible, accessible, and flexible
platform, SQL Server 2005 Analysis Services data mining capabilities introduces data
mining to organizations that previously would never have considered a data mining
solution.
Through an enterprise class architecture; a deep integration with the SQL Server family
of business intelligence tools, and a rich set of tools, APIs and algorithms, SQL Server
enables the creation of a new breed of intelligent applications that enhance productivity,
increase profits and reduce costs by providing customized data-driven solutions to a
broad range of business problems.
Reporting Services
Reporting Services extends the Microsoft BI platform to reach the information worker
who needs access to business data. Reporting Services is a server-based enterprise
reporting environment, managed via Web services. Reports can be delivered in a variety
of formats, with a range of interactivity and printing options. Complex analyses can reach
a broad audience through the distribution of reports as a data source for downstream
business intelligence.
An integrated component of SQL Server 2005, Reporting Services provides:
• A high performance engine for processing and formatting reports.
• A complete set of tools for creating, managing, and viewing reports.
• An extensible architecture and open interfaces for embedding reports or
integrating reporting solutions in diverse Information Technology environments.
Relational and OLAP Reports
Reports built on relational data are useful but the ability to add additional analytic
capabilities makes reporting powerful. Reporting Services allows you to easily build
reports together or separately. SQL Server 2005 supports both relational and OLAP data
and provides a query editor for both including SQL Query Editor and MDX Query
Editor.
Report Builder
Report Builder, a new component of SQL Server 2005 Reporting Services, allows
business users to create their own reports using a user-friendly model of their data.
Report Builder leverages the Reporting Services platform to bring ad hoc reporting to all
end users. Users create and edit reports with the Report Builder client application. The
Report Builder user interface is built on top of familiar Microsoft Office paradigms such
as Excel and PowerPoint. Figure 7 shows a sample Report Builder report.

Figure 7: Design reports with Report Builder

Report Builder is a ClickOnce application deployed via the browser. Users start by
selecting report layout templates containing predefined data sections such as tables,
matrices and charts. They drag and drop report items from the model to the design
surface and set constraints to filter the report data. The model contains all of the
necessary information for the Report Builder to automatically generate the source query
and retrieve the requested data. The Report Builder also allows users to:
• Add text and formatting to reports.
• Create new fields and calculations defined using the model.
• Preview, print, and publish reports.
• Export report data to formats such as Microsoft Excel.
Integration with the Microsoft Office System
Reports that are served up by the Report Server in Reporting Services can run in the
context of Microsoft SharePoint® Portal Server and Microsoft Office System
applications such as Microsoft Word and Microsoft Excel. You can use SharePoint
features to subscribe to reports, create new versions of reports, and distribute reports. You
can also open reports in Word or Excel to view HTML versions of the reports.
Upgrading to SQL Server 2005
Following are some tips for upgrading to SQL Server 2005.
• Upgrade to SQL Server 2005 from SQL Server 7.0 or SQL Server 2000.
• Run Upgrade Advisor before upgrading to determine if any product changes are
expected to break existing applications.
• The Database Engine, Analysis Services, and Reporting Services can be upgraded
by Setup.
• SQL Server Integration Services, the replacement for DTS, is installed side-by-
side with DTS. You can run DTS packages using the DTS runtime components.
• SQL Server 2005 Notification Services is installed side-by-side with Notification
Services 2.0. You must migrate instances of Notification Services to SQL Server
2005 when you upgrade the Database Engine.
• Use the Surface Area Configuration tool after upgrading to enable or disable SQL
Server 2005 services, network protocols, and features.
Microsoft SQL Server Pricing and Licensing
The family of SQL Server editions includes everything you need in one product for a
comprehensive, out-of-the-box data storage, management, analysis and reporting
platform with flexible licensing that allows you to choose the solution that best fits your
unique needs
Designed to scale from the largest enterprise down to the smallest business, SQL Sever
provides the same performance, security, reliability, and business value to all customers.
SQL Server supports implementations ranging from multi-terabyte data warehouses to
Pocket PC devices running SQL Server Windows CE Edition.
Pricing & licensing
Edition Pricing Benefit Size Key Features
4-GB DB size
1 CPU
Fastest way to learn,
build and deploy Simple Reporting
Express Free 1-GB RAM
simple data-driven
applications. Replication & SSB
4-GB DB size
Client
Management Studio

$3,900 per Import/Export


Most affordable and
processor
easiest to use database 1-2 CPUs
Limited Replication
Workgroup solution for smaller
$739 Publishing
departments and 3-GB RAM
(server + 5
growing businesses.
users) Clustering

Back-up Log Shipping


Database Mirroring

Basic ETL

Standard OLAP Server


with Analysis Services

$6,000 per Standard Reporting with


Complete data
processor 1-4 CPUs Reporting Services
management and
Standard analysis platform for
$2,799 Unlimited Data Mining
medium businesses and
(server + RAM
larger departments.
10 users) Full Replication & SSB
Publishing

Available in native 32-


and 64-bit editions

Supports Itanium2 and


x64
Enterprise $25,000 per Fully integrated data Unlimited Advanced database
processor management and Scale & mirroring, Complete
analysis platform for Partitioning online & parallel
$13,500 business-critical operations, and
database snapshot.

Advanced analysis tools


including full OLAP &
Data Mining.

Advanced reporting
with customized, high
scale, and ad hoc
reporting.
(server +
enterprise applications.
25 users)
Advanced ETL with
complex data routing and
transformation
capabilities.

Available in native 32
and 64 bit editions.

Supports Itanium2 and


x64
This table outlines the pricing and benefits for each edition of the Microsoft SQL Server
2005 product line.
Note: Bold indicates a feature that is new for Microsoft SQL Server 2005. Each higher
edition includes the same functionality as the edition below it. All prices are in US dollars
and reflect pricing for purchases within the United States.
For more information on pricing and licensing and the SQL Server 2005 product line
please visit the following:
http://www.microsoft.com/sql/howtobuy/default.asp
http://www.microsoft.com/sql/howtobuy/understdbpricing.asp
Top Of Page

Windows Server System Common Engineering Roadmap


SQL Server is part of the Windows Server System—a comprehensive and integrated
server infrastructure that simplifies the development, deployment, and operation of
flexible business solutions.
As a key part of the Windows Server System family, SQL Server 2005 includes a
standard set of capabilities such as common patch management, Watson support, and
tools such as the Microsoft Baseline Security Analyzer to deliver a consistent and
predictable experience to Windows Server System customers.
The goal of the Windows Server System Common Engineering Roadmap is to create a
set of common services that will be implemented across all Windows Server System
server products. This set of common services raises the bar for server infrastructure and
helps ensure that products throughout Windows Server System are engineered for greater
security, reliability, manageability, and flexibility. The Windows Server System
Common Engineering Roadmap builds on the following initiatives to enable customers to
meet today’s business challenges and the challenges of tomorrow.
To deliver on this vision of flexible Information Technology, Microsoft is currently
focusing on three key initiatives:
• .NET, Microsoft’s Web services strategy, connects information, people, systems,
and devices through software. Adopting services-oriented architecture throughout
the Microsoft platform provides businesses with the ability to quickly build,
deploy, manage, and use connected, security-enhanced systems based on Web
services. These systems enable faster, more agile business integration and deliver
on the promise of information anytime, anywhere, on any device.
• Dynamic Systems Initiative (DSI) is focused on delivering systems that are
designed with operations in mind and are built to monitor ongoing operations and
adjust dynamically based on models that can change with the business. This
initiative unifies hardware, software, and service vendors around a model-based
management that enables customers to harness the power of industry-standard
hardware and brings simplicity, automation, and flexibility to Information
Technology operations. The goal is to reduce management and operations costs,
improve reliability, and increase responsiveness throughout the entire Information
Technology life cycle.
• Trustworthy Computing is a long-term, company-wide, and collaborative effort
to create and deliver more secure, private, and reliable computing experiences for
users, while reducing the demands on users and Information Technology
administrators. The goal of Trustworthy Computing is to deliver the security,
privacy, reliability, and business integrity that people expect from the computing
industry.
In the Common Engineering Criteria for 2005, 16 different specifications have been
defined and applied throughout the Windows Server System. Beginning with 2005
versions, all Windows Server System products will either comply with these criteria, or
have specific reasons for any exemptions, with implementation plans for future releases.
Microsoft will add specifications at regular intervals to continue to address customer
requirements and deliver on the vision for Windows Server System. These specifications
and their implementation details, including any exception information, will be published
regularly on the Windows Server System Web site,
http://www.microsoft.com/windowsserversystem.
Conclusion
SQL Server 2005 provides the technology and capabilities that organizations count on.
With significant advancements in the key areas of enterprise data management, developer
productivity, and business intelligence, the benefits of SQL Server 2005 are substantial.
This paper demonstrates that SQL Server 2005 can benefit your organization in the
following ways:
• Leverage data assets: In addition to delivering a secure, reliable database for line-
of-business and analytical applications, SQL Server 2005 enables customers to get
more value from their data by including embedded functionality such as reporting,
analysis, and data mining.
• Increase productivity: Through comprehensive business intelligence capabilities
and integration with familiar tools like Office, SQL Server 2005 provides
information workers in your organization with critical, timely business
information that is tailored to their specific needs. Our goal is to extend BI to all
users within an organization and ultimately to allow users at all levels of the
organization to make better business decisions based on one of their most valuable
assets—their data.
• Reduce Information Technology complexity: SQL Server 2005 simplifies the
development, deployment, and management of line-of-business and analytical
applications by providing a flexible development environment for developers and
integrated, automated management tools for database administrators.
• Lower Total Cost of Ownership (TCO): Our integrated approach and focus on
ease-of-use provides the industry’s lowest upfront, implementation, and
maintenance costs for rapid returns on your database investment.
This paper provides only an overview of all the new benefits and functionality in SQL
Server 2005. For more information, please visit the following:
SQL Server site on TechNet: http://www.microsoft.com/technet/prodtechnol/sql
SQL Server Developer Center: http://msdn2.microsoft.com/sqlserver/default.aspx
SQL Server 2005 Web site: http://www.microsoft.com/sql/2005

You might also like