Sdílet prostřednictvím


sys.assembly_modules (Transact-SQL)

Returns one row for each function, procedure or trigger that is defined by a common language runtime (CLR) assembly. This catalog view maps CLR stored procedures, CLR triggers, or CLR functions to their underlying implementation. Objects of type TA, AF, PC, FS, and FT have an associated assembly module. To find the association between the object and the assembly, you can join this catalog view to other catalog views. For example, when you create a CLR stored procedure, it is represented by one row in sys.objects, one row in sys.procedures (which inherits from sys.objects), and one row in sys.assembly_modules. The stored procedure itself is represented by the metadata in sys.objects and sys.procedures. References to the procedure’s underlying CLR implementation are found in sys.assembly_modules.

Column name

Data type

Description

object_id

int

Object identification number of the SQL object. Is unique within a database.

assembly_id

int

ID of the assembly from which this module was created.

assembly_class

sysname

Name of the class within the assembly that defines this module.

assembly_method

sysname

Name of the method within the assembly_class that defines this module.

NULL for aggregate functions (AF).

null_on_null_input

bit

Module was declared to produce a NULL output for any NULL input.

execute_as_principal_id

int

ID of the database principal under which the context execution occurs, as specified by the EXECUTE AS clause of the CLR function, stored procedure, or trigger.

NULL = EXECUTE AS CALLER. This is the default.

ID of the specified database principal = EXECUTE AS SELF, EXECUTE AS user_name, or EXECUTE AS login_name.

-2 = EXECUTE AS OWNER.

Permissions

In SQL Server 2005 and later versions, the visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.