Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does SQL Server store deployed CLR Assemblies?

I have created a SQL CLR User defined function and deployed it to a database on a SQL Server instance, where it is working correctly.

Where does SQL Server store deployed CLR assemblies? Are they stored somewhere in the file system?

like image 773
Expert Novice Avatar asked Jan 16 '15 05:01

Expert Novice


1 Answers

Deployed User CLR assemblies are stored in the database you deploy them to, not on the file system.

Execute

SELECT * FROM sys.assembly_files 

the column called content contains binary data is the assembly.

See CREATE ASSEMBLY:

Creates a managed application module that contains class metadata and managed code as an object in an instance of SQL Server. By referencing this module, common language runtime (CLR) functions, stored procedures, triggers, user-defined aggregates, and user-defined types can be created in the database

like image 191
Mitch Wheat Avatar answered Oct 20 '22 18:10

Mitch Wheat