Location : Home >> Wikipedia >> SQL CLR

Search Wikipedia

SQL CLR

From Wikipedia, licensed under CC BY-SA 4.0. View the original article on Wikipedia.

Microsoft database software technology
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (December 2025) (Learn how and when to remove this message)
icon
This article only references primary sources. Please improve this article by adding secondary or tertiary sources. Unsourced material may be challenged and removed.
Find sources: "SQL CLR" – news · newspapers · books · scholar · JSTOR
(December 2025) (Learn how and when to remove this message)
icon
You can help expand this article with text translated from the corresponding article in Chinese. (December 2025) Click [show] for important translation instructions.
  • Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must follow the LLM translation guideline, revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wikipedia.
  • Consider adding a topic to this template: there are already 441 articles in the main category, and specifying|topic= will aid in categorization.
  • Do not translate text that appears unreliable or low-quality. If possible, verify the text with references provided in the foreign-language article.
  • You must provide copyright attribution in the edit summary accompanying your translation by providing an interlanguage link to the source of your translation. A model attribution edit summary is Content in this edit is translated from the existing Chinese Wikipedia article at [[:zh:SQL CLR]]; see its history for attribution.
  • You may also add the template {{Translated|zh|SQL CLR}} to the talk page.
  • For more guidance, see Wikipedia:Translation.
(Learn how and when to remove this message)

SQL CLR or SQLCLR (SQL Common Language Runtime) is technology for hosting of the Microsoft .NET common language runtime engine within SQL Server. The SQLCLR allows managed code to be hosted by, and run in, the Microsoft SQL Server environment.[1]

This technology, introduced in Microsoft SQL Server 2005, allow users for example to create the following types of managed code objects in SQL Server in .NET languages such as C# or VB.NET.[2]

  • Stored procedures (SPs) which are analogous to procedures or void functions in procedural languages like VB or C,
  • Triggers which are stored procedures that fire in response to Data Manipulation Language (DML) or Data Definition Language (DDL) events,
  • User-defined functions (UDFs) which are analogous to functions in procedural languages,
  • User-defined aggregates (UDAs) which allow developers to create custom aggregates that act on sets of data instead of one row at a time,
  • User-defined types (UDTs) that allow users to create simple or complex data types which can be serialized and deserialized within the database.

The SQL CLR relies on the creation, deployment, and registration of CLI assemblies, which are physically stored in managed code dynamic load libraries (DLLs). These assemblies may contain CLI namespaces, classes, functions and properties.

References

  1. ^ rwestMSFT. "Common Language Runtime (CLR) Programming - SQL Server". learn.microsoft.com. Retrieved 2025-12-29.
  2. ^ rwestMSFT. "Use Common Language Runtime (CLR) Integration to Build Database Objects - SQL Server". learn.microsoft.com. Retrieved 2025-12-29.

External links

.NET
Implementations
Architecture
Components
Tools
Decompilers
Obfuscators
IDEs
Organizations


Stub icon

This database software-related article is a stub. You can help Wikipedia by adding missing information.

Text is from Wikipedia, licensed under CC BY-SA 4.0. A link to the original article is included on every page. Original article. Search Wikipedia on nomadlouie.com.