sys.assembly_modules (Transact-SQL)sys.assembly_modules (Transact-SQL)

适用对象: yesSQL ServernoAzure SQL 数据库yesAzure SQL 数据仓库yes并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database yesAzure SQL Data Warehouse yesParallel Data Warehouse

为公共语言运行时 (CLR) 程序集所定义的每个函数、过程或触发器返回一行。Returns one row for each function, procedure or trigger that is defined by a common language runtime (CLR) assembly. 此目录视图将 CLR 存储过程、CLR 触发器或 CLR 函数映射到其基础实现。This catalog view maps CLR stored procedures, CLR triggers, or CLR functions to their underlying implementation. 类型为 TA、AF、PC、FS 和 FT 的对象具有相关联的程序集模块。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. 例如,在创建 CLR 存储过程时,它表示通过中的一行sys.objects、 利用某个中的一行sys.procedures (派生自sys.objects),和中的一行sys.assembly_modulesFor 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. 中的元数据表示存储的过程本身sys.objectssys.proceduresThe stored procedure itself is represented by the metadata in sys.objects and sys.procedures. 对过程的基础 CLR 实现的引用中找到sys.assembly_modulesReferences to the procedure's underlying CLR implementation are found in sys.assembly_modules.

列名Column name 数据类型Data type 描述Description
object_idobject_id intint SQL 对象的对象标识号。Object identification number of the SQL object. 是在数据库中唯一。Is unique within a database.
assembly_idassembly_id intint 创建此模块所基于的程序集的 ID。ID of the assembly from which this module was created.
assembly_classassembly_class sysnamesysname 定义此模块的程序集中的类名。Name of the class within the assembly that defines this module.
assembly_methodassembly_method sysnamesysname 中的方法的名称assembly_class定义此模块。Name of the method within the assembly_class that defines this module.

对于聚合函数 (AF),该参数的值为 NULL。NULL for aggregate functions (AF).
null_on_null_inputnull_on_null_input bitbit 将模块声明为针对任意 NULL 输入生成 NULL 输出。Module was declared to produce a NULL output for any NULL input.
execute_as_principal_idexecute_as_principal_id intint 在其中执行上下文的数据库主体的 ID,该 ID 由 CLR 函数、存储过程或触发器的 EXECUTE AS 子句指定。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。NULL = EXECUTE AS CALLER. 这是默认设置。This is the default.

指定的数据库主体 ID = EXECUTE AS SELF、 EXECUTE AS user_name,或 EXECUTE AS login_nameID of the specified database principal = EXECUTE AS SELF, EXECUTE AS user_name, or EXECUTE AS login_name.

-2 = EXECUTE AS OWNER。-2 = EXECUTE AS OWNER.

权限Permissions

目录视图中仅显示用户拥有的安全对象的元数据,或用户对其拥有某些权限的安全对象的元数据。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. 有关详细信息,请参阅 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

请参阅See Also

对象目录视图 (Transact-SQL) Object Catalog Views (Transact-SQL)
目录视图 (Transact-SQL)Catalog Views (Transact-SQL)