Friday, August 26, 2016

SYS.SQL_MODULES in T-SQL (Catalog View)

Sys.Sql_Modules return objects detail in Sql Server database. We can get detail about Stored Procedures, Replication filter procedure , Views , DML Triggers ,SQL Scalar Function  ,SQL in line table, SQL Table value function ,Rules

Columns

object_id
definition
uses_ansi_nulls
uses_quoted_identifier
is_schema_bound
uses_database_collation
is_recompiled
null_on_null_input
execute_as_principal_id

SELECT  object_id, definition, uses_ansi_nulls, uses_quoted_identifier,
                 is_schema_bound,uses_database_collation, is_recompiled,null_on_null_input,                                      execute_as_principal_id
 FROM   sys.sql_modules