Reporting Stored Procedure Metadata : sys.sql_modules « System Tables Views « SQL Server / T-SQL Tutorial






4>
5> SELECT definition,
6> execute_as_principal_id,
7> is_recompiled,
8> uses_ansi_nulls,
9> uses_quoted_identifier
10> FROM sys.sql_modules m
11> INNER JOIN sys.objects o ON
12> m.object_id = o.object_id
13> WHERE o.type = 'P'
14> GO
definition

                 execute_as_principal_id is_recompiled uses_ansi_nulls uses_quoted_identifier
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
---------------- ----------------------- ------------- --------------- ----------------------

create procedure dbo.sp_MSrepl_startup
as
    exec sys.sp_MSrepl_startup_internal

                                                                     NULL             0               0
     0
create procedure dbo.sp_MScleanupmergepublisher
as
    exec sys.sp_MScleanupmergepublisher_internal

                                                     NULL             0               1                      0
1>








27.16.sys.sql_modules
27.16.1.Displays the trigger SQL definition (if the trigger is not encrypted)
27.16.2.Reporting Stored Procedure Metadata