SQL Server 2008 and .NET Framework 2.0 SP2 dependency explained

Recently a local SA Developer .NET community member reported an issue installing SQL Server 2008 Express as it required the as yet unreleased .NET Framework 2.0 SP2.

Well yes, SQL Server 2008 does rely on the .NET Framework 2.0 SP2. According to MSDN SQL Server 2008 requires .NET Framework 3.5 SP1 which is included in all editions except for the Express editions which require the following:

SQL Server Setup will not install the following required components for SQL Server Express and SQL Server Express with Advanced Services. You must install these components manually before you run SQL Server Setup:

  • SQL Server Express — ..NET Framework 2.0 SP2 and Windows installer 4.5. On Windows Vista, use .NET Framework 3.5 SP1.
  • SQL Server Express with Advanced Services — .NET Framework 3.5 SP1, Windows Installer 4.5, and Windows PowerShell 1.0.

A little more digging and I found Somasegar’s post about the FX 3.5 SP1 beta and subsequently a comment from Larry Sullivan, Group Manager:

First we absolutely realized that there are a number of customers still on .Net Framework 1.1 and we will look into the possibility of servicing it again.  I can tell you that the servicing requests on 1.1 are very low and the volume of servicing requests is a big part of what plays into the timing and need for an SP.  Which of course leads into your questions of why we are updating the 2.0 bits again which comes down to the fact that to provide a service pack of .Net Framework 3.5 it was necessary to provide fixes in the lower level core parts of the .Net Framework.  Given that we needed to update a number of binaries to deliver the 3.5 SP1 we made the decision to go ahead and allow an additional set of fixes into the 2.0 and 3.0 layers.   This is a byproduct of the fact that the current set of .Net Framework versions are much like a layer cake with .Net Framework 2.0 at the bottom, then .Net Framework 3.0 and finally the .Net Framework 3.5 layered on top.  Each of the upper layers has dependencies into lower layers, but not vice versa.  In other words 3.5 can depend on 3.0 and/or 2.0, but 2.0 has no dependencies on 3.0 or 3.5.  As you can see this means that some fixes or features in the 3.5 can require updates in their dependant layer to function properly.  Also, with the introduction of 3.5 we now allow for the SPs of the .Net Framework to install on both machines with predecessor version or no version at all.  This allows customers to not have to deploy two items, the RTM version and its SP, but only the SP.

So that explains it. Personally I’d like to see a list of changes for each service pack and for each service pack to have a standalone installer, but it seems Microsoft chose to bundle it to possibly hide the deployment issues away from the end user. If you look at the .NET Framework 3.5 Architecture of the .NET Framework you’ll see the following note:

Windows Vista does not support the standalone installation of the .NET Framework version 2.0 SP2 or version 3.0 SP2. Windows 2000 does not support the .NET Framework version 3.5 SP 1, nor the standalone installation of the .NET Framework version 3.0 SP 2.

At the end of the day Microsoft hasn’t concealed the FX 2.0 SP2 release, they just didn’t advertise it clearly. I’d appreciate it if they were a little more clear in their release notes.

Xbox 360 announcements from Leipzig

Looks like the run up to the 2008 festive season is going to be quite a busy one with some good interactive titles planned for release on the Xbox 360 platform. Its great that there should be a game for every member of the family. I’m personally keen to try out Lips and the new Scene It trivia game as I know how much fun Singstar and Buzz were on the PS2 platform.

Here is the South African press release:

LEIPZIG, Germany 20th August 2008 – During this year’s Games Convention at Leipzig, Germany, Xbox 360 presented its forthcoming range of entertainment offerings. The visitors of Europe’s biggest fair for PC- and video games were shown a unique range of titles, and Xbox 360 was once again able to underscore its leadership role in the field of digital entertainment.

Blockbusters for both the whole family and committed gamers – the 2008 lineup

Xbox 360 offers a broad range of entertainment. From now through to Christmas and beyond you can expect a top-class line-up of titles that offer the perfect games for everyone’s taste and interests. The highlights are:

· Lips (iNis / Microsoft Game Studios): Exclusively on Xbox 360, Lips will be released in November and offers unique new music features. Lips will come with numerous localised tracks, with new songs by national and international artists being added on a regular basis. But that is only just the start: For Lips is the first game that allows players to sing from their own music collections. Players become stars at every party with the help of the motion sensitive microphones, which reward high-impact performances. Developed by Keiichi Yano of Gitaroo Man fame, Lips takes a totally new approach when developing this music game. Available for Christmas 2008

· Fable II (Lionhead Studios / Microsoft Game Studios): Peter Molyneux’ most recent opus is one of the most anticipated games of the year 2008. It will offer an unequalled level of freedom of choice and create a new gaming experience. Every decision has an immediate impact on the fate of the hero and his surrounding world. The game’s role playing experience has also been enriched further by a co-op mode: gamers can play with friends either sitting together on the sofa. The game will be available in Europe from the 24th October.

· Too Human (Silicon Knights/ Microsoft Game Studios): With Too Human, fans can expect an epic action game with several RPG elements. A fantastic story, in-depth character design and an extraordinary technical level underlines the reputation that precedes Silicon Knights. After almost ten years of development, the long expected sci-fi-epic will be available from the 29th of August – exclusively for Xbox360.

· You’re in the Movies (Codemasters/ Microsoft): Become a movie star with You’re in the Movies: gamers are filmed acting out film roles, from a kung-fu fighter to a zombie using the Xbox Live Vision camera.  You’re In The Movies is the first game that allows you to become part of a movie and the result is different every time. Available from November 2008.

· Scene It? Box Office Smash (Krome Studios and Screenlife/ Microsoft Games Studios):  Scene It? Box Office Smash is the second Xbox 360 instalment of the popular movie quiz.  Totally new questions, puzzles and many movie clips in HD quality ensure a party atmosphere. Available from November 2008.

· Banjo-Kazooie: Nuts and Bolts (Rare Ltd./ Microsoft Game Studios):  Two of the most popular video games ever are back – exclusively on Xbox 360. From the developers of Rare comes Banjo-Kazooie: Nuts and Bolts, an innovative action adventure. Players are given plenty of material to design their own vehicles, and also get to choose how Banjo and his friend Kazooie overcome obstacles which come their way.

· Viva Piñata: Trouble in Paradise (Rare Ltd./ Microsoft Game Studios): From early September, players can leave the boundaries of their gardens and discover the whole new world of the Piñatas. In two new regions, the arctic and the desert, new and unknown animals are hiding.  Designed by Rare, Viva Piñata: Trouble in Paradise is a colourful entertainment experience for the whole family. Up to four players can create their gardens simultaneously or compete in the talent show P-Factor. Viva Piñata: Trouble in Paradise will be released on the 5th September.

Source: South African press release. For the US press release see Xbox Press

A practical use for filtered indexes

Have you ever wanted to create a table in SQL Server with a nullable column that should be unique as well? I have often needed this and resorted to defining a new table that links to the master table. But SQL Server 2008 has the solution to this, see my example below.

CREATE TABLE [dbo].[Person] (
      [Id]              INTEGER IDENTITY(1,1) PRIMARY KEY CLUSTERED,
      [FirstName]       NVARCHAR(50) NOT NULL,
      [LastName]        NVARCHAR(50) NOT NULL,
      [EmailAddress]    VARCHAR(256) NULL
);

ALTER TABLE [dbo].[Person]
      ADD CONSTRAINT [AK_Person_0] UNIQUE NONCLUSTERED ([LastName], [FirstName]);

Next consider adding a unique constraint or unique index on the EmailAddress column to make sure its unique.

ALTER TABLE [dbo].[Person]
      ADD CONSTRAINT [AK_Person_1] UNIQUE NONCLUSTERED ([EmailAddress]);

So far so good, we can now add some test data.

INSERT INTO [dbo].[Person] VALUES (N’Bob’, N’Smith’, ‘bob@smith.com’);
INSERT INTO [dbo].[Person] VALUES (N’Bob’, N’Jones’, ‘bob@jones.com’);
INSERT INTO [dbo].[Person] VALUES (N’Mary’, N’Smith’, NULL);

Next try insert another person with no email address.

INSERT INTO [dbo].[Person] VALUES (N’Frank’, N’Smith’, NULL);

Whoops, looks like our unique constraint is not going to let us have more than one NULL in the table. Which is correct. So how can we fix this, well this is where the new SQL Server 2008 filtered indexes come in. We simply create an index with a WHERE clause as follows:

CREATE UNIQUE NONCLUSTERED INDEX [IX_Person_EmailAddress]
      ON [dbo].[Person] ([EmailAddress])
      WHERE [EmailAddress] IS NOT NULL;

And then we can insert our new record without having the problem as we did with the unique constraint.

Unfortunately there is a limitation to how this can be used. A unique index cannot be used in a foreign key constraint. I just wish the SQL Server team would add the WHERE clause, and while they are at it the INCLUDE clause as well, to unique constraints.

Thanks to Gail for the suggestion.

Tech-Ed South Africa 2008 Photos

This year Tech-Ed South Africa was held in Durban, South Africa’s playground, and I managed to snap a few photographs with my new Sony DSLR-A350 camera.

The event started off as per usual with a bit of a show by some talented dancers and some sexy ladies in bikinis. 🙂 Unfortunately I had to rely on a steady hand to get the opening keynote photos as I was way back in the auditorium.

Opening dancers Opening dancers - E X P L O R E

And to get the ball rolling Manoj Boohla was rikshawed to the stage, body board under his arm and wearing a Sharks supporter shirt.

Manoj Bhoola, body board in hand

This year BB&D sponsored the MVP Cave where South African Most Valuable Professionals were invited to stay together at The Sandringham B&B in Umhlanga.

View from the balcony in the morning View of the pool at night

I took way too many photos to blog about, so you can browse the rest of the photos over here.

Visual Studio 2008 Service Pack 1 released

image If you are a developer using Visual Studio 2008 and have tried to install SQL Server 2008 on top of it, you might have noticed that it doesn’t want to install. According to KB956139 Visual Studio 2008 Service Pack 1 is a required if you intend to use certain features like the the SQL Server Management Studio.

The good news is that Visual Studio 2008 Service Pack 1 has been released to MSDN. It weighs in at a hefty 831MB so hopefully it will have lots of cool stuff and performance improvements not to mention support for the .NET Framework 3.5 Service Pack 1 release that has already shipped as part of SQL Server 2008.

SQL Server Spatial Tools now available on CodePlex

Isaac Kunen has posted details about the new SQL Server Spatial Tools project on CodePlex containing functions that can be used when working with the new SQL Server 2008 spatial data types.

The core idea is that instead of pushing up more samples showing how to extend our spatial functionality in text, we can put them in a more usable form.  Beyond just showing off some samples, though, we’d like to assemble useful code into a toolkit that provides some real functionality over what we bake into the server.

For a list of the goodies that the package contains take a look here and go and download the source code.

SQL Server 2008 ships

Microsoft SQL Server 2008 The other day during the Tech-Ed South Africa 2008 closing keynote it was announced that SQL Server 2008, formerly code-named Katmai, had gone gold and would release onto MSDN the same day. This is awesome news and the team has worked hard on this release.

The most important new features in my opinion are:

  • Spatial support in the form of the new GEOMETRY and GEOGRAPHIC data types with support for the Open Geospatial Consortium (OGC) standards.
  • New support for storing date and times, namely the DATE, TIME, DATETIME2 and DATETIMEOFFSET data types.
  • Sparse columns that reduce the overhead of NULL data on the disk.
  • Page compression to reduce the I/O costs of storing and retrieving data at the slight cost of processor performance.
  • Filtered indexes to provide optimised query plans for commonly used and under-performing queries.
  • Change Data Capture (CDC) to record changes in data across tables, seamlessly.
  • Intellisense in the SQL query editor when working against SQL Server 2008. Hopefully support for older versions is added soon.

image

You can see all the new features over here and the download is currently available on MSDN and TechNet.

Over the next few weeks I’ll be testing the new features and I’ll post my findings as I go. I’m eagerly waiting for Map Server for Windows to add support for SQL Server 2008 as I’m sure it will kick the collective butt of PostgreSQL and PostGIS.