what you need to know about sql server 2008...

15
What You Need to Know About SQL Server 2008 Community Technology Preview 5 (November 2007) By Douglas McDowell, Ron Talmage, and Craig Utley Published: January 2008

Upload: others

Post on 02-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

What You Need to Know About SQL Server 2008Community Technology

Preview 5 (November 2007)

By Douglas McDowell, Ron Talmage, and Craig Utley

Published: January 2008

Page 2: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

1 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

➔ Contents

Copyright 2008 Dell. All rights reserved

What You Need to Know About SQL Server 2008Community Technology

Preview 5 (November 2007)

It feels like SQL Server 2005 was just being released; it was actually November 7, 2005, already over two years ago. And though many customers are saying SQL Server 2008 is being released too quickly,

it is exactly in keeping with Microsoft’s resolution never to go five years in between SQL Server releases and always release new versions every two to three years. Microsoft’s commitment to tighter product release cycles demonstrates the company’s desire to deliver added features more rapidly and in more manageable chunks, so Microsoft isn’t offended when people say 2008 is not a major version release—arguably, Microsoft wants to prevent that from happening again and instead sup-ply a consistently better database product across a steady release cycle.

So as we approach the release of SQL Server 2008, expected late the second quarter of 2008, Microsoft has provided early access to the product during development using the Community Technology Preview (CTP) paradigm introduced during the SQL Server 2005 and Visual Studio 2005 development cycle. Using broad-reaching CTPs instead of small software Beta programs has added incredible value to the product in the form of feedback from experts and customers interested in try-ing the product throughout the development lifecycle, it has also help customer readiness and increased product adoption. The CTP process has been one of the best quality assurance programs for Microsoft’s soft-ware development; CTP users have submitted software bugs allowing Microsoft to quickly address real-world product issues prior to product release.

I. Mission-Critical Features ............................ 2 Security .................................................... 2 Transparent Data Encryption ............... 2 Extensible Key Management ............... 2 Business Continuity .................................. 2 Backup Compression .......................... 2 Database Mirroring Enhancements ..... 4 Performance ............................................. 4 Resource Governor ............................. 4 Plan Guide Enhancements .................. 6 Scalability ................................................ 6 Query Processing on

Partitioned Objects ............................. 6 Partitioned Aligned Indexed Views ...... 6 Hot Add CPU (pluggable) ................... 6II. Enterprise Management Features ............... 6 Policy Management.................................. 6 Declarative Management

Framework .......................................... 7 Monitoring ............................................... 8 Extended Events .................................. 8 Data Collector .................................... 8 SQL Dependency Reporting ............... 8 Memory Monitoring DMVs ................. 8 Deprecation Events and

Performance Counters ........................ 8 Management Tools ................................... 8 Intellisense in Management Studio ..... 8 Configuration Servers .......................... 9III. Database Data and Programmability ........ 9 New Data Types ....................................... 9 Date and Time Data Types .................. 9 Spatial Data ...................................... 10 Complex Data Support ........................... 10 External Data: The FILESTREAM

Data Type ......................................... 10 Improved XML Support ..................... 10 CLR Improvements ................................. 10 Large User Defined Types and

User Defined Aggregates .................. 10 Filtered Indexes ................................ 10IV. New Business Intelligence Features ........ 10 Relational Engine Improvements

for BI ...................................................... 10 Star Join Query Optimization ................. 11 Change Data Capture ....................... 11 MERGE Statement ............................. 11 Integration Services Improvements ......... 11 Enhanced Lookup Transformation ..... 11 Improved Scripting ........................... 11 Analysis Services .................................... 11 Improved Cube Design Wizard ......... 11 Best Practices Alerts Built In ............. 11 Attribute Relationship Designer ........ 12 Aggregation Design Tool ................... 13 Improved Data Mining Algorithms .... 14 Reporting Services ................................. 14 New, Improved Report Designer ....... 14 The Tablix Control ............................ 14 New Charts and Gauges ................... 14 No Dependency on IIS ..................... 14 About the Authors .................................. 14

Page 3: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

2 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

Now we are well into the SQL Server 2008 development cycle and as of November 2007 we have CTP number five of an estimated six CTPs before release to manufac-turing (RTM). Each CTP has progressively delivered more complete (or at least partially usable) product features, rendering CTP5 near fully functional. Given the maturity of CTP5, if you haven’t tried out SQL Server 2008, this release is probably a good time to start.

So you might be asking: What is in CTP5 for me? The general answer is “a lot” so we have broken it down into four major areas of interest:

I. Mission-Critical FeaturesII. Enterprise Management FeaturesIII. Database Data and Programmability IV. New Business Intelligence Features

That way you can jump ahead to what you like most and it will be easy to go back and reference topics for others in your organization as you start planning for SQL Server 2008 in your environment.

It is time to start reading and as soon as you are ready to get started, go get the latest SQL Server 2008 CTP: http://www.microsoft.com/sql/2008/prodinfo/download.mspx

I. Mission-Critical Features

SecurityThe SQL Server 2008 November CTP delivers on improvements in secure data access and compliance with auditing standards. Standing out among security enhance-ments is Transparent Data Encryption, the ability to encrypt an entire database using a SQL Server certificate. In addition, you can use and manage external hardware encryption key devices with Extensible Key Management

Transparent Data EncryptionEncryption of the database data is a common requirement for compliance with legal or external auditing require-ments. SQL Server 2008’s Transparent Data Encryption is transparent in the sense that data encryption occurs in real-time, automatically, without any changes to appli-cations. It is true data encryption because it encrypts both the SQL Server database and log files, so the result-ing files on disk persist in an encrypted format. It also encrypts database and log backups. If the database files or backups are compromised in any way, they will not be readable without the appropriate database encryption key on another instance of SQL Server 2008 (or later).

To encrypt a database, you first make sure that you have created a database master key. You then create a SQL Server self-signed certificate, or use a certificate you have obtained elsewhere, that is protected by the database maser key. Using the certificate, you create a database encryption key specifically for the purpose of encrypting the database’s data. The database encryption key is stored in the database boot record, so it is backed up with the database. Once the database encryption key is in place, you can set the database to use encryption with the ALTER DATABASE command.

When you restore or attach an encrypted database to another instance of SQL Server 2008, the other instance must have the same database master key. SQL Server 2008 gives you the ability to export the certificate and a private key to a file, and then import it to another SQL Server instance. You can then create the database encryp-tion key on the other instance and restore the database. These export and import steps will be required for mirror-ing and log shipping encrypted databases.

Extensible Key ManagementYou can use third-party hardware security modules with SQL Server 2008 database data. These third-party vendors can register their devices with SQL Server 2008, and then you can use encryption keys supplied by the modules with your SQL Server 2008 data. SQL Server 2008 will use the external device as the key store. Extensible Key Management is only available in SQL 2008 Enterprise Edition (plus, of course, Developer and Evaluation) but not in the Standard and Workgroup Editions.

Business ContinuitySQL Server 2008 November CTP5 assists in providing high availability and reducing planned downtime by introducing Backup Compression. Backup compression is one-half of a two-pronged approach to data compres-sion in SQL Server 2008. (The other is compression in the database real-time, which is slated for a later CTP.)

Backup CompressionYou can compress database backups using SQL Server 2008 Enterprise Edition (also with the Developer and Evaluation Editions). The resulting database backup images will be compressed on disk or tape, and are auto-matically uncompressed when the database is restored. Backup compression affects only the backup images, not the SQL Server data and log files.

Page 4: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

sponsored by DELL SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 3

You can compress all types of database backups: full, differential, and transaction log backups. Even though only Enterprise Edition (and Developer and Evaluation Editions) can compress a backup, every edition of the SQL Server 2008 database engine will be able to restore the compressed backups, for all backup types.

You can enable backup compression as the default behav-ior at the server level by setting the ‘Compress backups’ checkbox in Management Studio’s Database Settings tab of the Server Properties dialog, as shown in Figure 1.

Figure 1 You can set Compressed Backups as a default for all server databases.

Page 5: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

4 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

You can also use the new ‘backup compression default’ option in the sp_configure system stored procedure. Either of these will make all backups default to compressed. You can also override the server-level default setting by using either the NO_COMPRESSION or COMPRESSION option in the BACKUP DATABASE command.

The Maintenance Plan Wizard has been revised so that you can specify backup compression for each backup set. In addition, when you use the SQL Server 2008 Integration Services (SSIS) Back Up Database task in a package, you can specify whether to use compression or not.

When you use backup compression, since the resulting backup file is smaller, SQL Server requires less I/O to write to disk, and also the time required for the com-pressed backup will be less as compared to an uncom-pressed backup. On my laptop, for example, backing up the sample AdventureWorks database without compres-sion takes 32 seconds and results in a 175MB backup file. Using backup compression, the same process takes 15 seconds, and creates a 45MB compressed backup file. Although the resulting backup will normally take up less space, and go more quickly, there will be increased CPU activity due to the process of compression.

To monitor backup compression, there are new columns in two system tables located in the msdb database. The backupmediaset system table contains a new is_com-pressed column which flags whether the set is com-pressed or not. The backupset system table contains a new compressed_backup_size column which displays the space taken by a backup.

You can also monitor backup compression throughput using the Windows Server System Monitor (Perfmon) counters for SQL Server backups: the Device Throughput Bytes/sec counter of the SQLServer:Backup Device object, and the Backup/Restore Throughput/sec counter of the SQLServer:Databases object.

Compressing backups will show the greatest benefit when the database data contains a lot of character columns and text-based data. Of course, if you encrypt a database, backup compression will be much less efficient. When using data compression (compression of database data in real time), backup compression may also be much less efficient.

Database Mirroring EnhancementsThe SQL Server 2008 July CTP4 contained a number of enhancements for Database Mirroring and these are pre-served in the November CTP5. Perhaps most notable are improvements to transaction log throughput. Transaction logs are now compressed by default, resulting in a mea-surable increase in performance. (For one example of testing log compression throughput, see the SQL Server Customer Team technical note, “Database Mirroring Log Compression in SQL Server 2008 Improves Throughput” at http://www.sqlcat.com.)

Database mirroring also now includes automatic page repair. If either a principal or mirror database detects a bad page, it can request the page from its partner and rewrite the page. If the request succeeds, the partner will replace the bad page with the fresh one, hopefully resolv-ing the error.

There are numerous new System Monitor (Perfmon) coun-ters for Database Mirroring, many of them related to mea-suring transaction log send and receive throughput.

PerformanceSQL Server 2008 increases control over factors affecting performance. By far the most awaited new feature is the Resource Governor.

Resource GovernorThe Resource Governor is way of defining SQL Server 2008 database engine workloads and then placing limits on the CPU and memory resources that these workloads can consume. You can configure the limits in real time without impacting currently executing processes. Also, the Resource Governor does not limit access to SQL Server 2008 by the dedicated administrator connection (DAC).

The first step is to decide what workload groups you want to single out for special limits. SQL Server 2008 already includes a default workload group which will apply to all other workloads that you do not single out.

The next step is to create a classification function that places incoming workloads (sessions doing work) into those workload groups. The classification function can filter those workloads, placing them into workload groups based on connection-specific attributes such a logins and application names. You then register the function and enable the Resource Governor.

Page 6: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

sponsored by DELL SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 5

Then you create resource pools containing the CPU and memory limits you want to impose. These resource pools just contain the definition of resource limits. They come into play when you assign a workload group to a resource pool. SQL Server 2008 contains a predefined default resource pool with no resource limits, which each work-load group will use until to decide otherwise.

The final step is to assign each workload group to a resource pool. Once you’ve done that, your workload groups will have resource limits imposed upon them. Defining the resource pools separately from the workload groups allows you to assign multiple groups to a single resource pool. Figure 2 shows an example of a configured resource pool and workload group.

Figure 2 You can define resource (CPU and memory) limits for applications using the Resource Governor.

Page 7: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

6 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

In Figure 2, resource pools have been defined for the HumanResources, Production, and Sales schemas of AdventureWorks. Each pool has a prefix of RP to identify it. As shown in the figure, the RP_HumanResources pool has been assigned to the WG_HumanResources work-load group. In the properties dialog shown, note that the RP_HumanResources pool has been limited to 40 percent maximum CPU usage.

Plan Guide EnhancementsIn SQL Server 2008, you can import and validate plan guides. SQL Server 2005 introduced plan guides, which are ways to influence the optimization of distinct subsets of queries. In a plan guide, you can specify the way you want a particular T-SQL statement optimized, or you can specify the actual query plan you want used.

SQL Server 2008 allows you to import an existing query plan into a plan guide by passing the XML plan into the new sp_create_plan_guide stored procedure as a param-eter. This simplifies the process of importing a query plan, and enables you to import plans from SQL Server 2005. You can also validate a query plan using the new system function sys.fn_validate_plan_guide.

ScalabilitySQL Server 2008 achieves more data throughput by enhancing both scale-out with new partitioning features, and scale-up with support for “hot add” CPU.

Query Processing on Partitioned ObjectsSQL Server 2008 improves the performance of many types of parallel query plans that go against partitioned tables and indexes. There is a new partition-aware seek operation for partition elimination. Partition information is now displayed in the graphical, textual, and XML show-plans.

Partitioned Aligned Indexed ViewsSQL Server 2008 extends partition alignment to indexed views. Previously, indexed views on partitioned tables did not distribute data in a partitioned fashion. In SQL Server 2008, when you create the clustered index of an indexed view, you can associate that index with the underlying partitioned table’s partition scheme, and SQL Server 2008 will distribute the indexed view’s data in a partitioned way also, thereby aligning the indexed view with the par-titioned table. This allows the indexed view to participate in the switch operation when new tables are added or removed from the partitioned table.

Hot Add CPU (pluggable)A “hot add CPU” refers to a feature in the 64-bit ver-sions of Windows Server 2008 Datacenter or Enterprise Editions, running on Itanium-based servers. If the hard-ware supports it, new CPUs can be added without hav-ing to restart the server. To make SQL Server aware of any new CPUs, the RECONFIGURE statement must be applied.

II. Enterprise Management Features

Policy ManagementThe blockbuster management feature of SQL Server 2008 is Declarative Management Framework (DMF), new in the November CTP5. You can manage the DMF by drill-ing down into the Policy Management node of a server in Management Studio, as shown in Figure 3.

Page 8: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

sponsored by DELL SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 7

In Figure 3, you can see the built-in policy called “Backup and File Location Best Practice” in the list of policies. The top dialog box shows the properties of this policy, that is applies to every user database on a SQL Server instance, and it is executed On Demand. Note that it has a condition called “Data and Backup on Separate Drive”, which has been opened in the lower dialog box. The condition has the facet “Database Maintenance”. To complete the condition, a built-in variable called @DaataAndBackupOnSeparateLogicalVolumes” is set to True in the condition’s Expression box.

Declarative Management FrameworkThe Declarative Management Framework gives you the ability to define a wide variety of policies and either monitor their compliance, or force their compliance, across one or more SQL Server instances. You can create your own policies or use the numerous built-in policies, many of them taken from the Best Practices Analyzer. Policies can apply at the server, database, or database object level.

The objects that policies will apply to are called targets. These targets could be database objects, databases, or SQL Server instances. You can group like target objects together as target sets. These targets have facets, proper-ties that you want to control. Any given target type can have many facets, and any given facet could apply to many target types.

Target-facet combinations have conditions. For example, whether a user-defined stored procedure has an sp_ prefix might be one such condition. A policy then is a decision about the correct condition for a target-facet combination, such as the policy that user-defined stored procedures should not have an sp_ prefix. Any given policy can have only one condition, and you can enable or disable the policy.

Because the number of policies may become large, it can be useful to place them in policy categories. A given poli-cy can belong to only one category, and there is a default category for all policies you do not explicitly categorize.

Figure 3 You can access the Declarative Management Framework in Management Studio.

Page 9: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

8 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

Once policies are defined, they can be applied to their targets either for purposes of enforcement, or simply to log compliance, and the results logged.

MonitoringSo far, the notable enhancements for SQL Server 2008 monitoring have all been introduced with the July and June CTPs.

Extended EventsThe July CTP4 introduced Extended Events, the basic infrastructure for an entirely new type of event tracing system for SQL Server 2008, something that will exist alongside SQL Trace/Profiler and Perfmon, but is supe-rior in its generality and integration with future versions of Windows. Using Extended Events, you can correlate data from SQL Server and sometimes from Windows and applications, using the Event Tracing for Windows (ETW facility).

Using Management Studio, you can explore the objects within XEvent packages, focusing on events, targets and actions. You can capture a number of SQL Server events and send them to an ETW session. At the same time, you can create an ETW session to capture events from the Windows kernel to disk. You can then merge the result-ing trace logs to correlate the SQL Server events with Windows events, something not possible with SQL Trace or SQL Profiler.

Data CollectorThe July CTP4 provides the Data Collector, which is one component of a broader feature called Performance Studio, which is not yet available. The Data Collector pro-vides the general infrastructure for collecting performance and diagnostic data about a SQL Server instance. The collected data is stored in a management data warehouse (MDW), a separate relational database that SQL Server 2008 creates.

SQL Dependency ReportingWith the July CTP4, the underlying dependency architec-ture has been revised in SQL Server 2008 to provide more reliable dependency information. SQL Server 2008 gives you one new catalog view and several system functions for use in reporting SQL dependencies. These provide reports on both schema-bound and non-schema-bound objects.

Memory Monitoring DMVsThe June CTP3 gives us five new dynamic management views for helping monitor SQL Server 2008 memory:

• sys.dm_os_memory_brokers • sys.dm_os_memory_nodes • sys.dm_os_nodes • sys.dm_os_process_memory • sys.dm_os_sys_memory

Deprecation Events and Performance CountersThe June CTP3 also introduces new SQL Trace events and System Monitor (Perfmon) performance counters to fire when deprecated commands are executed against a SQL Server 2008 instance. This will assist in helping upgrade applications that may use deprecated T-SQL constructs.

Management ToolsNotable new features for management tools in the November CTP5 include Intellisense in Management Studio, and Configuration Servers.

Intellisense in Management StudioManagement Studio now contains Intellisense, which is on by default. Intellisense detects characters as you type within a Management Studio query window or the XML editor, and provides potential word completion as well as parameter choice. Figure 4 shows Intellisense providing a drop-down for the tables belonging to the HumanResources schema in AdventureWorks.

Page 10: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

sponsored by DELL SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 9

You can restrict the extent of Intellisense to any combi-nation of word completion and parameter choice in the Tools/Option dialog. You can also specify the maximum size for any T-SQL script that Intellisense should be active, so that it becomes inactive once a script exceeds a certain size.

Configuration ServersWith SQL Server 2008 you can now use Management Studio to query multiple SQL Server instances at once. You designate a given SQL Server instance as a configura-tion server and then associate it with groups of other SQL Server instances. You can then apply T-SQL queries and Declarative Management Framework policies against the entire group of servers.

You can create server groups using Management Studio, and then query multiple servers simultaneously by query-ing the associated server group. You can configure the results sets being returned using the Multiserver Results page in the Tools/Options dialog.

III. Database Data and Programmability

New Data TypesSQL Server 2008 introduces a number of new data types, including a way to separate date and time, as well as an offset for dealing with time zone issues. Additionally, there is a new category of data types for dealing with spa-tial data, a completely new feature in SQL Server 2008.

Date and Time Data TypesSQL Server 2008 introduces four new data types for deal-ing with date and time data. The DATE data type does not store any time value with it and takes up only three bytes of storage, compared to eight bytes for the current DATETIME data type. The DATE data type is accurate to one day and ranges from January 1, 0001 to December 31, 9999.

The TIME data type consists of time values but no date. It consumes between three and five bytes of storage depending on the precision set for time, which can be as fine as 100 nanoseconds, or nine places to the right of the

Figure 4 With Management Studio's Intellisense, you can pick from a list of tables in a schema.

Page 11: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

10 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

decimal. The benefit of the TIME data type is the ability to store very high precision time values in a small amount of space.

The DATETIME2 data type is a new type introduced to store high precision date and time data, but it manages to do this in the same storage space as the standard DATETIME data type, which is eight bytes. DATETIME2 can store dates from January 1, 0001 to December 31, 9999 with a precision of 100 nanoseconds, combining the power of both the DATE and the TIME data types.

The DATETIMEOFFSET is the largest of the date and time data types as far as storage, taking from eight to ten bytes of storage depending on the precision set by the DBA. It stores the same date and time data as DATETIME2 but adds an offset value in hours and minutes, ranging from -14:00 to +14:00. While this data type doesn’t understand time zones per se, meaning for example that users can’t enter Eastern Time, the purpose of the offset is to handle such issues. Therefore, instead of Eastern Time, the offset could be set to -5:00 for Eastern Standard Time.

Spatial DataSQL Server 2008 adds native spatial data support for the first time in the form of two new data types: GEOGRAPHY and GEOMETRY. These two new data types support the two primary areas of spatial data: geodetic and planar. Geodetic data is sometimes called round earth because it assumes a roughly spherical model of the world using industry standard ellipsoids such as WGS84, the projection used by Global Position System (GPS) applications. Planar data assumes a flat projection and is therefore sometimes called flat earth. Data is stored as points, lines, and polygons on a flat surface.

The new spatial capabilities include importing geographic data in a variety of industry standard formats and the fea-tures conform to the Open Geospatial Consortium (OGC) standards. There’s even a .NET library that supports OGC and allows for data stored in spatial data types to be inte-grated with applications such as Microsoft Virtual Earth, so that stored data can be overlaid on maps generated and maintained by Virtual Earth.

Complex Data Support

External Data: The FILESTREAM Data TypeToday, storing external files such as audio, video, scanned images, and so forth, requires either a pointer to an external share or storing a BLOB (binary large object) directly in the table. The FILESTREAM data type allows for BLOB data to be stored in the file system but remain

a part of the database, including transactional consis-tency. Backups can include or exclude the binary data, and working with the data is done with standard SELECT, INSERT, UPDATE, and DELETE statements in T-SQL.

Improved XML SupportXML Schemas now support lax validation through the use of the any, anyAttribute, and anyType declarations. This allows SQL Server 2008 to support wildcard sec-tions in XML documents. In addition, SQL Server supports dateTime, time, and date validation, including time zone information. SQL Server 2008 now supports the let clause in XQuery, which allows developers to assign values to variables.

CLR Improvements

Large User Defined Types and User Defined AggregatesSQL Server 2005 allowed for user defined types (UDTs) and user defined aggregates (UDAgg) of 8000 bytes, but SQL Server 2008 increases this all the way to 2GB. This works especially well for scenarios involving the new spatial data, which can be quite large in size.

Filtered IndexesFiltered indexes can create an index on a column that is filtered. This allows for the creation of a unique index on a column even if multiple records contain NULL values.

IV. New Business Intelligence Features

Business Intelligence (BI) is an area that has grown from a niche market a few short years ago to being one of the fastest-growing and important markets for databases. Microsoft SQL Server was already a leading database for business intelligence implementations, and SQL Server 2008 builds on this with powerful new features in the relational database engine, Integration Services, Analysis Services, and Reporting Services. Adding new BI features to all facets of SQL Server show Microsoft’s strong com-mitment to the continued evolution of SQL Server as the premier integrated suite for performing BI projects.

Relational Engine Improvements for BIBI applications generally consist of a relational data warehouse, in which the data is normally stored in a star schema. Since data warehouses often store relational data before building cubes, optimizations can be done

Page 12: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

sponsored by DELL SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 11

in the relational engine to make it more efficient for stor-ing, retrieving, and updating data in a large relational data warehouse.

Star Join Query OptimizationStar schemas are schemas in which data is stored in two types of tables: fact and dimension tables. Dimension tables typically hold entities data such as products, cus-tomers, accounts, time, and so forth. Dimension tables are denormalized and typically contain a single field primary key of an integer data type. A fact table contains the numeric values being measured such as dollar sales, scrap tonnage, headcount, and so forth. The primary key of the fact table is a composite key made up of the foreign keys of the related dimension tables. Given that there is a common join pattern for querying star schemas, SQL Server 2008 includes optimizations for queries matching this pattern.

Change Data CaptureChange Data Capture (CDC) is a component that tracks data changes in the background. Data changes are stored and exposed through a relational interface so that the changes can be consumed easily. This allows businesses to monitor data changes according to the rules they spec-ify and access that data using T-SQL, Integration Services, or other applications. While not specific to BI, CDC works well in BI scenarios by allowing applications to capture changes in dimension data such as product and customer changes, and flow those changes into the warehouse as necessary.

MERGE StatementThe MERGE statement provides a single statement for inserting, updating, and deleting data. In the BI world, inserts and updates will be the most common, and hav-ing a single statement to perform these changes simpli-fies the code. For example, modifying the data in a fact table might include changing the daily total as new orders come in. The source table would include transaction details while the target aggregates sales to the day level. The MERGE would take records from the source table and if that product doesn’t yet exist in the target table, the record would be inserted. If the product does exist, the record would be update to add the new orders to the existing total.

Integration Services ImprovementsIntegration Services is the primary tool for performing extraction, transformation, and loading (ETL) in a BI envi-ronment. As such, Integration Services is often relied upon to perform complex data transformations, large lookups against dimension data, and more. There are improve-

ments to Integration Services that improve its ability to move and transform data, including an improved Lookup transformation and more powerful scripting and support for C# in the Script Task.

Enhanced Lookup TransformationWhen loading data into a relational warehouse, develop-ers commonly look up values from reference tables to replace keys in the source data with actual values, or vice versa. In SQL Server 2005, these reference tables could be stored in memory in their entirety (up to 4GB), partially loaded, or queried each time. These same options still exist in SQL Server 2008 but two important enhancements have been made. First, the size of the cache can be larger than 4GB on both 32-bit and 64-bit machines, which will allow for larger tables to be loaded into memory. Second, the cache can persist between packages. This means that if more than one package needs to access the same ref-erence data, it can be loaded in a persistent cache and shared by all the packages, rather than be loaded and unloaded for each package.

Improved ScriptingWhile the Script Task in Integration Services 2005 could use Visual Basic (VB), SQL Server 2008 improves the Script Task so that developers can use either VB or C#. This is useful for those who work with C# or one of the many variants of the C language.

Analysis ServicesAnalysis Services 2005 was significantly redesigned from previous versions and required a new way of approach-ing the creation of dimensions and cubes. The changes greatly improved the flexibility of the analysis that could be performed, but many developers struggled to build cubes properly. With Analysis Services 2008, Microsoft has placed great emphasis on tools that guide the design of cubes so that they are created properly.

Improved Cube Design WizardThe Cube Design Wizard in Analysis Services 2008 has been modified to help developers build better cubes fast-er, using fewer steps. These cubes will be leaner and more focused than cubes created by the wizard in Analysis Services 2005 and also enhances the ability to build cubes off of single, denormalized tables.

Best Practices Alerts Built InBest Practices Alerts are integrated through many of the wizards in Analysis Services 2008. These alerts appear as blue squiggly lines under certain items and warn users when an item does not match what are considered the optimal rules. There are five different categories of warn-

Page 13: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

12 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

ings and users can customize which warnings should be raised and which should not.

Attribute Relationship DesignerOne of the most important features in Analysis Services 2005 was sadly also one of the most confusing: Attribute Relationships. Attribute relationships define how elements in a dimension are related; for example, months roll up into quarters and quarters roll up into years. By default, Analysis Services sees months and quarters and years as

distinct attributes with no relationships between them. Analysis Services 2008 includes a new, visual designer so cube designers can visualize the relationships to verify they exist, and also to locate redundant or incorrect relationships. Having the visual designer should greatly improve the cubes by allowing people to more easily create proper attribute relationships. The new Attribute Relationships designer can be seen in Figure 5, where it clearly shows the relationships and includes warnings for redundant relationships.

Figure 5 The new Attribute Relationship designer gives a graphical representation of the relationships. This image shows a warning about a redundant relationship.

Page 14: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

sponsored by DELL SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 13

Aggregation Design ToolAggregations were a bit of a black box in Analysis Services 2005, with the engine deciding which aggregations to build based on its own internal algorithms. Analysis Services 2008 includes tools for advanced cube develop-ers to view and even create or modify individual aggre-

gations as necessary. This should help companies fine tune their aggregations and avoid problems with over-aggregation. Figure 6 shows the new aggregation design tool, which allows cube designers to fine tune the aggre-gations.

Figure 6 The advanced view of the Aggregations tab allows users to pick and choose the attributes that make up a specific aggregation.

Page 15: What You Need to Know About SQL Server 2008 …i.dell.com/.../Documents/server-2008-tech-whitepaper_fr.pdfSQL Server 2008 database data. These third-party vendors can register their

14 SQL SERVER 2008 COMMUNITY TECHNOLOGY PREVIEW 5 sponsored by DELL

Improved Data Mining AlgorithmsData mining gets a boost in Analysis Services 2008 with improved time series forecasting and market basket anal-ysis. The time series algorithm now includes two meth-ods: ARTXP (Auto Regression Trees with Cross Predict) and ARIMA (Auto Regressive Integrated Moving Average), which provide both good short-term forecasts and stable long-term forecasts.

Reporting ServicesReporting Services is an important part of the Microsoft BI strategy. Combining excellent relational reporting features with analytical cube-browsing capabilities and end-user ad hoc reporting, Reporting Services continues to embed itself into the day to day operations of businesses world-wide. Reporting Services 2008 enhances the experience through a new designer, new controls, and the ability to run without Internet Information Services.

New, Improved Report DesignerThe Report Designer has been redesigned to make it easier for report developers to work with queries and create reports. New Row Groups and Column Groups boxes appear on the screen, along with the controls for the report and a treeview of the parameters, images, and fields, meaning far less flipping back and forth or opening and closing of windows than in today’s version.

The Tablix ControlThe Tablix control is a new control that combines the Table and Matrix controls for added flexibility. For exam-ple, in the Table, rows can repeat but columns are fixed, while the matrix has dynamic rows and columns. The Tablix can have both fixed and dynamic values in both the rows and columns. The Table control does not allow for omitting the row and column headers, but the Tablix takes this option from the Matrix and makes it available.

New Charts and GaugesMicrosoft has licensed the Dundas charting tools for inclusion in SQL Server 2008. Dundas is a company known for powerful charts and gauges for creating visu-ally appealing reports and web pages. The charts and gauges from Dundas will provide advanced, powerful user interface elements for reports.

No Dependency on IISReporting Services 2008 will no longer require Internet Information Services in order to run. Instead, it will handle requests, render reports, and return them on its own. Instead of IIS, Reporting Services uses SQL Server’s networking stack and HTTP.SYS directly. This simplifies management and configuration of Reporting Services and leverages features of SQL Server.

About the AuthorsDouglas McDowell is managing director at Solid Quality Mentors and is an author and contributing editor for SQL Server Magazine. Douglas is a Microsoft Most Valuable Professional (MVP) for SQL Server, a member of Microsoft’s Business Intelligence Partner Advisory Council, and a charter member of the Professional Association of SQL Server (PASS) Regional Mentor pro-gram, he speaks about business intelligence at numer-ous technical conferences, user groups and professional groups each year and has been very involved in deliv-ering SQL Server, Office and PerformancePoint Server awareness events and trainings throughout the world and online.

Ron Talmage is a mentor and co-founder with Solid Quality Mentors. He has over twenty years experience in the IT world, and has been providing SQL Server mentoring, teaching, and conference presentations since version 4.21a. He is a SQL Server MVP and cur-rent president of the Pacific Northwest SQL Server Users Group. He writes regularly for CoDe Magazine online and SQL Server Magazine. You can reach him at [email protected]

Craig Utley is a mentor with Solid Quality Mentors and a former Program Manager on the SQL Server Customer Advisory Team at Microsoft. He has been working with Microsoft’s BI products since the beta of SQL Server 7, helping to author Microsoft’s first data warehousing course and teaching it at Microsoft and many other com-panies. Craig now spends helps companies implement BI solutions using Microsoft and related technologies, cover-ing all aspects from architecture and design to implemen-tation and training. He is a published author, conference speaker, and member of the INETA Speakers Bureau.