Using the CLR with C# DLLsUsing the CLR with C# DLLsUsing the CLR with C# DLLs
Microsoft’s Patrick Conlan explains how C# DLLs will work with the CLR in SQL Server 2005.
February 21, 2006
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
Read more about:
MicrosoftAbout the Author
You May Also Like
ITPro Today's 2025 IT Priorities Report
Aug 8, 2025|2 Min ReadEdge Computing Trends: Adoption, Challenges, and Future Outlook
Jul 15, 2025|2 Min ReadITPro Today’s 2024 State of DevOps Report
Dec 16, 2024|2 Min ReadBCDR Basics: A Quick Reference Guide for Business Continuity & Disaster Recovery
Oct 10, 2024|1 Min Read
Recent What Is
Enterprise Connect 2026 – All In on What’s Next