Archive

Posts Tagged ‘Stored Procedures’

Delete All Stored Procedures (MSSQL)

January 18th, 2009

Every now and then I need to delete quite a few Sprocs. It’s really a pain in the arse to do this with SQL Server Management Studio as it doesn’t let you delete more than one sproc at a time. So, I found this script that works pretty good (source).

1) Click the ‘Results To Text‘ button

2) Run:
SELECT ‘Drop Procedure ‘ + SCHEMA_NAME(schema_id)+’.'+name FROM sys.procedures

3) Copy the queries you want to run.

4) PasteĀ and run

5) ???

6) Profit.

Programming/Development , ,