Transact-SQL: Delete (drop) all user stored procedures from database
Microsoft SQL Server 2005/2008
Run this code in your database context in SQL Management Studio:
SELECT
'DROP PROCEDURE [' + name + ']'
as 'CopyThisColumnAndExecuteToDeleteAllProcedures'
FROM
sys.procedures
WHERE
[type] = 'P'
AND is_ms_shipped = 0
AND [name] NOT LIKE 'sp[_]%diagram%'
ORDER BY
[name] ASC

Copy generated statements and just run them to DELETE these stored procedures.


Simply the best!
Same method you can use for tables or other objects.

(394)

