Subscribe: SQL Server 2005: CLR Integration
Added By: Feedage Forager Feedage Grade B rated
Language: English
aggregate  assembly  clr  code  defined  exception handling  exception  running  server  sql clr  sql server  sql  user defined  user 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: SQL Server 2005: CLR Integration

SQL Server 2005: CLR Integration

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

Last Build Date: Mon, 06 Nov 2006 14:20:00 +0000


Dynamic Assembly Loading II: SGen and System Defined Classes

Mon, 06 Nov 2006 14:20:00 +0000

Today we’ll look at an example where sgen did not solve the problem with a dynamically loaded XmlSerializers assembly.   This issue was found by a customer and filed as a bug on the Microsoft Connect site for SQL Server:   In brief, the code was trying to write out an XmlSchema object to a...

Dynamic Assembly Loading

Wed, 18 Oct 2006 14:50:00 +0000

Simple question: what security permission level is required to allow dynamic loading of assemblies? Trick question: dynamic assembly loading is always disallowed under SQL CLR, even under UNSAFE.    This is mentioned twice in BOL: CLR Integration Programming Model Restrictions : “Loading an assembly—either explicitly by calling the System.Reflection.Assembly.Load() method from a byte array, or implicitly...

Deadlock Detection in SQL CLR

Tue, 25 Jul 2006 15:54:00 +0000

Usually, talking about the differences between running code under the CLR vs. running under SQL CLR focuses on functionality that either doesn’t work or is difficult to use in a safe and reliable manner.  However, one feature that SQL Server actually adds to the CLR environment is deadlock detection.    Joe Duffy mentions this in his article,...

SQL Server 2005 Debugging Requirements

Fri, 07 Jul 2006 15:30:00 +0000

There have been some questions about the sysadmin requirement of SQL Server 2005 Debugging, and I’d like to explain it in some details.  When you debug T-SQL or CLR code in SQL Server 2005, there are two users involved: user running the debugger and user making the connection that is being debugged.  User running the...

Exception handling in SQLCLR

Thu, 29 Jun 2006 22:42:00 +0000

Naveen covered the TSQL exception handling in his posts on sqlprogrammability blog site. How does the TSQL exception handling mechanism interacts with SQLCLR exception handling mechanism? We will cover this topic in this post.   When SQL server execute a user function/procedure/trigger implemented in CLR (i.e., managed code), we will install a managed exception handler around the...

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

Thu, 29 Jun 2006 22:39:00 +0000

SQL Server 2005 ships with a new debugging engine that supports debugging of any T-SQL and CLR code running in the server, including batches, stored procedures, user defined functions/aggregates/triggers, etc.  You can use Visual Studio 2005 to debug against SQL Server 2005 or SQL Server 2000, but you can not use Visual Studio 2003 or...

Strong named assemblies and AllowPartiallyTrustedCallers

Thu, 22 Jun 2006 21:49:00 +0000

  Very often, you may wish to factor out your code into separate assemblies in your application. For example, you separate your type in one assembly because it gets used by multiple areas in your application. And you save your proc that uses that type in another assembly. So Let's say you have two CLR...

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

Thu, 22 Jun 2006 21:42:00 +0000

In part 1 we created a nice user defined aggregate. Now we are going to make it more sophisticated and let its value depend on two parameters ShipCountry and ShipShipCity. You might try having two parameters in Accumulate function of the aggregate but you will get an error The Accumulate method in user defined aggregate...

Creating a CLR user define aggregate (part 1). Simple CLR aggregate

Thu, 22 Jun 2006 21:40:00 +0000

SQL Server 2005 allows creating of User Defined Aggregate in any of the .NET  languages such as C# or VB. For simple cases like SUM or MAX you probably want  to use built-in aggregates, however there are cases  where build-ins are insufficient. In such cases people used to put the business logic on a client...

Impersonation in SQL CLR

Sat, 17 Jun 2006 01:21:00 +0000

When the user code will try to access a resource outside of the SQL server it will run in the security context under which SQL Server is running. But this is not the ideal situation since it could become a security issue when the logged user that calls the code has less privileges than account...