Using the CLR with C# DLLs

I understand that SQL Server 2005 is completely based on .NET Server and as such is integrated with Visual Studio .NET. Does this integration mean that I can use the CREATE ASSEMBLY command to register the DLLs I've created in C#? I also have an extended stored procedure that I created in Visual C++. Can I migrate this procedure, or do I have to create it again in C#?

Your existing extended stored procedures will continue to run as before. In addition, SQL Server 2005 integrates the .NET Framework Common Language Runtime (CLR) environment into its process space, which lets the SQL Server host programs that are written in .NET Framework languages. However, SQL Server itself is still essentially a large, unmanaged C and C++ program. You might need to make some small changes to move your C# code,ranging from altering your connect string to use the in-process SQLClient to adding metadata to complete rewrites. Before you try moving C# DLLs into SQL Server, you should perform due diligence to ensure that the move makes sense.You can get guidance for your decision from several white papers on the MSDN SQL Server site.You might start with the article "Using CLR Integration in SQL Server 2005" at http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsql90/html/sqlclrguidance.asp.

—Patrick Conlan
Platform Program Manager
Microsoft Project Team

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottOur Experts will show you:
• Common SQL Server
Problems
• Best Practices for T-SQL
• SQL Server Integration
Services
• Database Development

Come See Mike Otey & Tim Ford in Person!

Early Registration Now Open

From the Blogs
May 9, 2013
blog

My ISO 8601-Compliant Signature 2

My family recently just "officially" announced that we're in the process of adopting a child from South Africa. We're quite excited, of course, but there's a ton of paperwork to do—along with the need for gobs of signatures....More
May 8, 2013
blog

Use SSIS for ETL from Hadoop

In this blog post, Mark Kromer walks you through using SSIS as a way to use ETL techniques using Microsoft's Hadoop on Windows (HDInsight) as a source using Hive connectors...More
Vision road sign
May 6, 2013
blog

Cheaters Never Win, Even in TPC Benchmarks

In this portion of the series on database benchmarking, I want to tell you about one of my favorite aspects of the TPC benchmarks – CHEATING....More
SQL Server Pro Forums

Get answers to questions, share tips, and engage with the SQL Server community in our Forums.