Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 5.47 KB

common-language-runtime-clr-integration-programming-concepts.md

File metadata and controls

58 lines (44 loc) · 5.47 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Common language runtime (CLR) programming
This article provides resources for using CLR integration with SQL Server, which allows you to write server-side modules using any .NET Framework language.
rwestMSFT
randolphwest
randolphwest
11/25/2022
sql
clr
reference
CLR [SQL Server] See common language runtime [SQL Server]
Database Engine [SQL Server], .NET Framework
.NET Framework [SQL Server], Database Engine programming
common language runtime [SQL Server]
.NET Framework [SQL Server]

Common language runtime (CLR) integration programming concepts

[!INCLUDE SQL Server SQL MI]

Beginning with [!INCLUDEssVersion2005], [!INCLUDEssNoVersion] features the integration of the common language runtime (CLR) component of the .NET Framework for [!INCLUDEmsCoName] Windows.

You can write stored procedures, triggers, user-defined types, user-defined functions, user-defined aggregates, and streaming table-valued functions, using any .NET Framework language, including Visual Basic and C#.

Remarks

  • SQL Server CLR integration doesn't support .NET Core, or .NET 5 and later versions.

  • You can load CLR database objects for [!INCLUDE sssql17-md] and later versions on Linux, but they must be built with the .NET Framework. Also, CLR assemblies with the EXTERNAL_ACCESS or UNSAFE permission set aren't supported on Linux.

  • By default, the .NET Framework runtime is installed with [!INCLUDEssNoVersion], but the .NET Framework SDK is not. To install the latest version of the .NET Framework SDK, see Download .NET Framework Developer Pack.

  • The Microsoft.SqlServer.Server namespace includes core functionality for CLR programming in [!INCLUDEssNoVersion]. For documentation on the Microsoft.SqlServer.Server namespace, see Microsoft.SqlServer.Server Namespace (.NET Framework 4.8).

  • CLR functionality, such as CLR user functions, aren't supported for Azure SQL Database.

In this section

The following table lists the articles in this section.

Article Description
Common Language Runtime (CLR) Integration Overview Provides a brief overview of the CLR, and describes how and why this technology has been used in [!INCLUDEssNoVersion]. Describes the benefits of using the CLR to create database objects.
Assemblies (Database Engine) Describes how assemblies are used in [!INCLUDEssNoVersion] to deploy functions, stored procedures, triggers, user-defined aggregates, and user-defined types that are written in one of the managed code languages hosted by the [!INCLUDEmsCoName] .NET Framework common language runtime (CLR), and not written in [!INCLUDEtsql].
Building Database Objects with Common Language Runtime (CLR) Integration Describes the kinds of objects that can be built using the CLR, and reviews the requirements for building CLR database objects.
Data Access from CLR Database Objects Describes how a CLR routine can access data stored in an instance of [!INCLUDEssNoVersion].
CLR Integration Security Describes the CLR integration security model.
Debugging CLR Database Objects Describes limitations of and requirements for debugging CLR database objects.
Deploying CLR Database Objects Describes deploying assemblies to production servers.
Managing CLR Integration Assemblies Describes how to create and drop CLR integration assemblies.
Monitoring and Troubleshooting Managed Database Objects Provides information about the tools that can be used to monitor and troubleshoot managed database objects and assemblies running in [!INCLUDEssNoVersion].
Usage Scenarios and Examples for Common Language Runtime (CLR) Integration Describes usage scenarios and code samples using CLR objects.

See also