Monday, July 26, 2010

Find all The User Defined Procedures in Sql

There is two ways to get the result:-
1. Using Comination of System define Procedure table and Schema table

Select * From sys.procedures As P
Inner Join sys.schemas As S On S.schema_id = P.schema_id
Where P.type = 'P' And is_ms_shipped = 0 And P.name Not Like 'Sp[_]%diagram%'

2. Using System define Object table
Select * From sys.objects
Where type = 'P' And is_ms_shipped=0 And name Not Like 'Sp_%diagram%'


Note:- is_ms_shipped Equals Zreo Means Show all the User defined events

No comments:

Post a Comment