Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 2.81 KB

managing-clr-integration-assemblies.md

File metadata and controls

43 lines (35 loc) · 2.81 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords dev_langs
Manage CLR Integration Assemblies
You can host managed DLL assemblies in SQL Server. You can register, alter, and drop assemblies, and also manage associated files and permissions.
rwestMSFT
randolphwest
12/27/2024
sql
clr
reference
database objects [CLR integration], assemblies
common language runtime [SQL Server], assemblies
assemblies [CLR integration], managing
TSQL

Manage CLR integration assemblies

[!INCLUDE SQL Server]

Managed code is compiled and then deployed in units called a common language runtime (CLR) assembly. An assembly is packaged as a DLL or executable (.exe) file. While an executable file can run on its own, a DLL must be hosted in an existing application. Managed DLL assemblies can be loaded into and hosted by [!INCLUDE ssNoVersion]. [!INCLUDE ssNoVersion] requires you to register the assembly in a database using the CREATE ASSEMBLY statement, before it can be loaded in the process and used. Assemblies can also be updated from a more recent version using the ALTER ASSEMBLY statement, or removed from [!INCLUDE ssNoVersion] using the DROP ASSEMBLY statement.

Assembly information is stored in the sys.assembly_files table in the database where the assembly is installed. The sys.assembly_files table contains the following columns.

Column Description
assembly_id The identifier defined for the assembly. This number is assigned to all objects relating to the same assembly.
name The name of the object.
file_id A number identifying each object, with the first object associated with a given assembly_id being given the value of 1. If multiple objects are associated with the same assembly_id, then each subsequent file_id value is incremented by 1.
content The hexadecimal representation of the assembly or file.

In this section

Article Description
Create an assembly Discusses creating SAFE, EXTERNAL_ACCESS, and UNSAFE CLR assemblies in [!INCLUDE ssNoVersion]
Alter an assembly Describes updating CLR assemblies in [!INCLUDE ssNoVersion]
Drop an assembly Discusses dropping CLR assemblies from [!INCLUDE ssNoVersion]

Related content