Sunday, October 9, 2011

Get list of the stored procedure from database


get list of the stored procedure which contains a

31MAR
Get list of the stored procedure which contains a text ‘RAISERROR’ 

SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE‘%RAISERROR%’ AND SPECIFIC_NAME   like ‘%api%’
You can get other important information using Information_schema, run the following query and get the stuff of your interest
SELECT* FROM INFORMATION_SCHEMA.ROUTINES

No comments: