Skip to main content

List all SQL CLR Functions, Stored Procedures, Objects for an assembly.

use _TARGET_DB_NAME_;

select
    SCHEMA_NAME(so.schema_id) as schema_name,
    af.file_id,
    af.name+'.dll' as file_name,
    asmbly.clr_name,
    asmbly.assembly_id,
    asmbly.name as assembly_name,
    am.assembly_class,
    am.assembly_method,
    so.object_id as sp_object_id,
    so.name as sp_name,
    so.type as sp_type,
    asmbly.permission_set_desc,
    asmbly.create_date,
    asmbly.modify_date
--af.content -- uncomment to show assembly contents
from sys.assembly_modules as am
inner join sys.assemblies as asmbly
    on asmbly.assembly_id = am.assembly_id
inner join sys.assembly_files as af
    on asmbly.assembly_id = af.assembly_id
inner join sys.objects as so
    on so.object_id = am.object_id;