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

適用於: 是SQL Server 否Azure SQL Database 是Azure Synapse Analytics (SQL DW) 是平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database yesAzure Synapse Analytics (SQL DW) yesParallel Data Warehouse

針對由 Common Language Runtime (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 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 執行內容所用的資料庫主體識別碼,由 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.

指定的資料庫主體識別碼 = 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.

PermissionsPermissions

目錄檢視內中繼資料的可見性會限制在使用者所擁有的安全性實體,或已授與使用者某些權限的安全性實體。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)