SQL Server 2005: CLR Integration

Samples, tips and tricks, insights from the CLR Integration team at SQL Server.

Dynamic Assembly Loading II: SGen and System Defined Classes

Today we’ll look at an example where sgen did not solve the problem with a dynamically loaded...

Author: stevehem Date: 11/06/2006

Dynamic Assembly Loading

Simple question: what security permission level is required to allow dynamic loading of assemblies?...

Author: stevehem Date: 10/18/2006

Deadlock Detection in SQL CLR

Usually, talking about the differences between running code under the CLR vs. running under SQL CLR...

Author: stevehem Date: 07/25/2006

SQL Server 2005 Debugging Requirements

There have been some questions about the sysadmin requirement of SQL Server 2005 Debugging, and I’d...

Author: sqlclr Date: 07/07/2006

Exception handling in SQLCLR

Naveen covered the TSQL exception handling in his posts on sqlprogrammability blog site. How does...

Author: sqlclr Date: 06/29/2006

Overview of T-SQL and CLR debugging in SQL Server 2005

SQL Server 2005 ships with a new debugging engine that supports debugging of any T-SQL and CLR code...

Author: sqlclr Date: 06/29/2006

Strong named assemblies and AllowPartiallyTrustedCallers

Very often, you may wish to factor out your code into separate assemblies in your application. For...

Author: sqlclr Date: 06/22/2006

Creating a CLR user define aggregate (part 2). Use multiple columns in the aggregation function

In part 1 we created a nice user defined aggregate. Now we are going to make it more sophisticated...

Author: sqlclr Date: 06/22/2006

Impersonation in SQL CLR

When the user code will try to access a resource outside of the SQL server it will run in the...

Author: sqlclr Date: 06/17/2006

Assembly redirection and CLR Integration

Assembly redirection is not supported in SQL CLR. Assembly redirection can be done using publisher,...

Author: sqlclr Date: 06/17/2006

Satellite assemblies in SQL Server 2005

This is a sample on how to register satellite assemblies in SQL Server 2005. Based on the...

Author: sqlclr Date: 06/13/2006

How to tell if your code should be yielding

As we saw in the last post, cooperative clr code that explicitly yields during long-running...

Author: stevehem Date: 04/14/2006

Who says tough guys never yield?

Perhaps you've seen the following note in BOL advising SQLCLR users to explicitly yield in their...

Author: stevehem Date: 04/10/2006

Memory Usage in SQL CLR

There are two important memory considerations you may want to track when using SQL CLR...

Author: stevehem Date: 03/24/2006

Now THAT's a Sample!

Perhaps you’ve heard all about the power and flexibility .NET framework integration provides in Sql...

Author: stevehem Date: 03/14/2006

UDT Execute Permission

The required cases for execute permission on UDFs and UDPs are pretty understandable, however the...

Author: stevehem Date: 03/06/2006

I found my appdomain, now what?

From the query I described yesterday, here are the different possible appdomain states and what they...

Author: stevehem Date: 02/22/2006

It’s 3 AM. Do you know where your appdomain is?

The dmv sys.dm_clr_appdomains is a great way to find information about the appdomains currently...

Author: stevehem Date: 02/21/2006

CLR Trigger for Automatic Registration of UDXs on CREATE ASSEMBLY

Using a CLR trigger we can register all user defined functions, procedures, types, aggregates etc.,...

Author: Miles Trochesset Date: 11/21/2005

CLR Trigger for Automatic Registration of UDXs on CREATE ASSEMBLY

This code is provided "AS IS" with no warranties, and confers no rights. I've made some small...

Author: Miles Trochesset Date: 11/21/2005

Best Week Ever

SQL Server provides the ability to find the week of the year in which a given date lies. For...

Author: sqlclr Date: 11/11/2005

Serialization and Ordering: An Integral Example

Some people peeked (and poked) under the covers and have been surprised at how SQL Server is...

Author: sqlclr Date: 10/17/2005

Tutorial on SqlClr Computed Columns and Indexability

Restrictive world of SqlClr computed columns and indexability With Yukon entering the world of...

Author: sqlclr Date: 10/03/2005

Using Webservices and Xml Serialization in CLR Integration

Last time we saw an example of using a powerful functionality, Regular Expressions, from a supported...

Author: sqlclr Date: 07/25/2005

Working with Regular Expressions

One of the many benefits of using CLR Integration in your database applications is the availability...

Author: sqlclr Date: 06/29/2005

IS NULL vs. IsNull

When using CLR UDTs, there has been some confusion regarding the difference between the T-SQL IS...

Author: sqlclr Date: 06/21/2005

Locales in SQL Server

Introduction Writing locale-safe external code in SQL Server has always been important due to the...

Author: sqlclr Date: 06/15/2005

Yet another TVF: returning files from a directory

In my previous BLOG entry dated May 5th, I promised another sample that retrieves multiple files...

Author: sqlclr Date: 05/20/2005

An Enigmatic Error while Returning UDT Results

Let's say we have a very simple (and silly) CLR UDT defined and loaded into SQL Server named CLRInt,...

Author: sqlclr Date: 05/11/2005

File Access and table-valued functions

In this article, we will discuss a sample CLR function that illustrates accessing an external...

Author: sqlclr Date: 05/05/2005

Welcome to the SQL-CLR blog

We hope to use this blog to communicate with the SQL Server user community on the CLR Integration...

Author: sqlclr Date: 05/04/2005