I finally tried out SQL Server 2005 today. I used the express edition, figure I'll get enough of the full featured versions at work and wanted to check out the express experience.
It was MUCH easier to get up and running with a simple test. The only roadblock was enabling the CLR, but after a few minutes I finally found the “Surface Area Configuration” tool.
I started out with a simple user defined function. Create a C# database project, click “Add User-Defined Function”, write the function body and click Deploy. I was then able to use the function directly in my queries.
[Microsoft.SqlServer.Server.
SqlFunction]
public static SqlString StringReverse(SqlString input)
{
if (input.IsNull)
return SqlString.Null;
char[] chars = input.Value.ToCharArray();
Array.Reverse(chars);
return new SqlString(new String(chars));
}
So I was pretty surprised to see how quickly I could get this running.. I figured there would be several more hoops to run through.
Next I think I'll try to determine how difficult deploying these assemblies via an installer will be.