Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

sys.all_sql_modules (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns the union of sys.sql_modules and sys.system_sql_modules.

The view returns a row for each natively compiled, scalar user-defined function. For more information, see Scalar User-Defined Functions for In-Memory OLTP.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview.

Column name

Data type

Description

object_id

int

ID of the object of the containing object. Is unique within a database.

definition

nvarchar(max)

SQL text that defines this module.

NULL = Encrypted

uses_ansi_nulls

bit

Module was created with SET ANSI_NULLS ON.

uses_quoted_identifier

bit

Module was created with SET QUOTED_IDENTIFIER ON.

is_schema_bound

bit

Module was created with the SCHEMABINDING option.

uses_database_collation

bit

1 = Schema-bound module definition depends on the default-collation of the database for correct evaluation; otherwise, 0. Such a dependency prevents changing the default collation of the database.

is_recompiled

bit

Procedure was created using the WITH RECOMPILE option.

null_on_null_input

bit

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

execute_as_principal_id

int

ID of the EXECUTE AS database principal.

NULL by default or if EXECUTE AS CALLER.

ID of the specified principal if EXECUTE AS SELF or EXECUTE AS <principal>.

-2 = EXECUTE AS OWNER.

uses_native_compilation

bit

0 = not natively compiled

1 = is natively compiled

The default value is 0.

Applies to: SQL Server 2014 through SQL Server 2016.

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.

Community Additions

ADD
Show:
© 2015 Microsoft