The first security layer for the common language runtime (CLR) subsystem is whether it is enabled or disabled.
Objects that can be written using .NET code are triggers, functions, stored procedures, aggregates, and data types. The code is compiled into an assembly, .DLL, which is then loaded into your SQL Server instance by a member of the sysadmin role.
.NET assemblies utilize Code Access Security to restrict the allowable set of operations that can be performed. SQL Server also utilizes the Code Access Security to lock down the managed code and ensure the integrity of the database server and operating system.
When creating the assembly, the sysadmin specifies the level of Code Access Security that is applied to the assembly. The access ...