Thursday, January 01, 2009

Here is a little commentary that I dispensed at my recent Nova CodeCamp presentation with regards to user defined aggregates written using SQL CLR for the Microsoft SQL Server. SQL 2008 has improved the user defined aggregate feature, but it currently comes at a price. First I discuss the attribute setting to implement the feature, then I provide necessary information on how to deploy it!

 

For those developers building user defined aggregates (UDA) in SQL Server 2008, you now can build an aggregate that exceeds the 8000 byte limitation in SQL Server 2005.

 

To implement this feature, you set the MaxByteSize to -1. This will allow the UDA to grow to a size above 8000 bytes up to 2 GB. An example of the attribute setting is shown below.

 

[Serializable]

[Microsoft.SqlServer.Server.SqlUserDefinedAggregate(

   Format.UserDefined,

   IsInvariantToNulls = true,

   IsInvariantToDuplicates = false,

   IsInvariantToOrder = false,

   MaxByteSize = -1)

        ]

 

Great so far. Now here is where the problem starts. You cannot deploy an assembly with a UDA having this setting from within Visual Studio 2008. You have to deploy the assembly manually.

/*

 * Manually add assembly to database

 */

CREATE ASSEMBLY UDA from 'D:\Development\UDA\bin\UDA.dll'

WITH PERMISSION_SET = SAFE

GO

If you attempt to deploy the UDA with the above attribute, you will get the following message:

 

Error: 'MaxByteSize' property specified was not found.

 

You can find information on MSDN about the MaxByteSize setting here.

 

1/1/2009 9:32:00 PM (Eastern Standard Time, UTC-05:00) |  | SQL Server 2008 | SQLCLR | UDA | Visual Studio 2008#
Thursday, October 18, 2007

OK, I'm a little slow. But, here are the two presentations I made at the Richmond Code Camp two weeks ago. These are in Microsoft Powerpoint.

XQuery for DBAs and Developers (Powerpoint)

Richmond Code Camp XQuery for DBAs and Developers.pptx (980.39 KB)

XQuery SQL Demonstration File (.SQL)

XQuery Presentation.sql (42.59 KB)

Dr. Jekyll and Mr. Hyde; SQLCLR for DBAs and Developers (Powerpoint)

SQLCLR Richmond Code Camp Oct 6.pptx (620.63 KB)

10/18/2007 8:54:40 AM (Eastern Standard Time, UTC-05:00) |  | .NET Framework 2.0 | Code Camp | SQL Server 2005 | SQLCLR | UDA | XML | XQuery#
Sunday, April 22, 2007

OK. I'm a slacker.

I promised to get this up back a month ago. Here is my powerpoint presentation on developing user defined aggregates in SQL Server 2005 using .NET CLR. I gave this presentation at the NovaSQL user group. The group is managed superbly by Jeremy Kadlec, who also does MS SQL Tips.

novasqlMarch2007.zip (2.2 MB)
4/22/2007 9:59:27 PM (Eastern Standard Time, UTC-05:00) |  | .NET Framework 2.0 | NovaSQL | Programming | SQL Server 2005 | UDA | Visual Studio 2005#
Thursday, March 29, 2007

I had the pleasure of presenting at Monday's NovaSQL user group meeting on developing User-Defined Aggregates using Visual Studio 2005.

I will post my presentation and code later today for anyone who is interested.

 

3/29/2007 8:09:30 AM (Eastern Standard Time, UTC-05:00) |  | SQL Server 2005 | Visual Studio 2005 | UDA#
Search
Archive
Links
Categories
Admin Login
Sign In
Blogroll
 CTO 2.0
Antonio Chagoury
 SharePoint Resources
Lamont Harrington
 Winsmarts
Sahil Malik
Themes
Pick a theme: