Wednesday, July 23, 2008

Key Features of SQL Server 2008

While at TechEd 2008, I obtained a listing of the key features of Microsoft SQL Server 2008. I have been wondering what the new features are and which ones I might be most interested in. I really like this particular list since it is so concise. I just ran across the list again and decided to share it here.


Manageability
  1. Simplify enterprise-wide configuration with Policy-Based Management.

  2. Troubleshoot, tune, and monitor SQL Server 2008 instances across the enterprise with Performance Data Collection.

  3. Script database maintenance tasks with Windows PowerShell(tm)
OLTP
  1. Help protect sensitive data with Transparent Data Encryption

  2. Audit all actions for more comprehensive security and compliance

  3. Prioritize workload processing with Resource Governor

  4. Minimize downtime with hot-add CPU support

  5. Help ensure business continuity with enhanced clustering capabilities and support for the new Windows Server 2008 clustering improvements

  6. Increase database resiliency with enhanced database mirroring that enables automatic recovery page of damaged pages

  7. Build peer-to-peer replication solutions quickly with enhanced wizards and topology management tools
Data Warehousing
  1. Enhance data warehouse ETL solutions with change data capture and the MERGE statement

  2. Benefit from improved lookup performance in Integration Services

  3. Reduce physical storage requirements for large data warehouses with data compression

  4. Enhance data warehouse query performance with partition-based parallel query processing and start schema optimizations

  5. Optimize storage space for NULL values with sparse columns
Business Intelligence
  1. Build high-performance analysis solutions with enhanced wizards, tools, and best practice warnings in Business Intelligence Development Studio

  2. Increase OLAP performance with writeback to MOLAP support and block computations

  3. Build high-performance reporting solutions with re-architected Reporting Services

  4. Create flexible report formats with new Tablix data regions

  5. Increase report value with rich text formatting and expanded chart support
Application Development
  1. Web-enable your data with ADO.NET Data services

  2. Simplify data access code with Language Integrated Query (LINQ) and query SQL Server databases with LINQ to SQL

  3. Take data offline with SQL Server Compact and synchronize your data with the new Microsoft Sync Framework

  4. Model your data with the ADO.NET Entity Framework

  5. Apply consistent query syntax and use LINQ to Entities to manage entities

  6. Use new data types and Transact-SQL capabilities to build powerful relational data applications

  7. Integrated data stored in file system stores with FILESTREAM support

  8. Build geospatial data applications with the geography and geometry data types


Hope that helps.

Joe Kunk
Okemos, MI

Monday, July 21, 2008

LINQ query to pull a single record from a collection still requires enumercation over results

I wrote a LINQ query in Visual Basic .Net 2008 in order to pull a single record from a Generic List collection. The intent was to use LINQ as an easier alternative to writing a Predicate function for the .Find method of the collection. The code is below. I made what I believe will be a common LINQ mistake. Below is the explanation of the errors I saw, the code that produced those errors, and then the proper way to do it.

A symptom of the problem is that the LINQ query returned a SelectIterator object and in order to see the string I had to enumerate (For Each) over the result in order to obtain the data. I knew that the WHERE condition was sufficient to return only a single result, but LINQ did not so it returned a SelectIterator to be enable me to enumerate through the result set.

If I tried to assign the LINQ result directly to a string, I get the error message "Conversion from type 'd__d(Of MyDataType,String)' to type 'String' is not valid.".

The incorrect code is:

Dim Result as string = string.empty
Dim Filename = From item In myCollection _
Where item.key.ToLower = MenuPath.ToLower _
Select item.MyFilename
For Each s As String In Filename : Result = s : Next
Console.WriteLine("Returned String : " + s)


The correct code is achieved by putting parenthesis around the LINQ query and using the .Single method to inform LINQ that we are expecting a single-value result. The corrected code is :


Dim Result as string = string.empty
Dim Filename = (From item In myCollection _
Where item.key.ToLower = MenuPath.ToLower _
Select item.MyFilename).Single
Console.WriteLine("Returned String : " + Filename)


A special thank you to Bill Wagner of SRT Solutions for his solution to the error in the first listing when I initially blogged it.

Hope that helps.

Joe Kunk
Okemos, MI

Tuesday, July 01, 2008

Article "How to Host a Great Code Camp" in July 2008 INETA newsletter

I wrote an article titled "How to host a great CodeCamp" in the July 2008 INETA newsletter based on our user group's experience hosting the Lansing Day of .Net on June 21, 2008, which by all accounts was a great success. The newsletter presented the article this way:


User Group Above and Beyond - This Month: Joe Kunk
*
This month we recognize Joe Kunk, President of the Greater Lansing (MI) User Group for .Net (or GLUGnet ), and his team for delivering an over the top experience in their first CodeCamp. Unlike any CodeCamp that I have ever heard of, they involved more than just techies, but included a closing keynote by the Mayor of Lansing and coverage by two local TV News stations. Continuing with his style of going above and beyond, Joe has written an article for this month's newsletter on what it takes to run a successful CodeCamp.

Read his article on How to Host a Great CodeCamp

About Joe Kunk:
Bio: Joe Kunk serves as President of the Greater Lansing User Group for .Net (GLUGnet) with independent monthly meeting locations in both East Lansing and Flint MI, co-founder of Listen IT Solutions (a mortgage software company), board member of the Lansing IT Networking Council (LINC), Senior Consultant at A. J. Boggs, Inc., and a great supporter of the .Net community. Joe has 25 years experience in the IT industry and wrote his first for-hire application on the Commodore Pet.