Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Multiple Stored Procedures... 2

Status
Not open for further replies.

bmgmzp

Programmer
Aug 18, 2006
84
US
How can I delete a bunch of stored procedures at once? I'm in the SQL Server 2005 Management Studio. I cant click on the first stored procedure then hold down shift and click on the last one. I'm sure there is an alternative way... does anybody know what it is?

Thanks
 
I haven't used 2005 yet, but in 2000 you can script objects out and there's an option to generate the drop and create script. Right click on the DB, select "all tasks" then "generate SQL Script". Click on "show all" and then either tick Stored procs (this will add them all to the list) and remove the ones you want to keep from the list, or don't tick it and work through the list adding those you want to drop. Then click on the formatting tab and remove the generate creat object, so you only have the drop object ticked. This will create a script to drop the objects you selected so just run it on the DB.

As I say, this is for 2000 and I have had no experience of 2005 so this might be worthless for you but worth a try!

HTH,

M.
 
Select Stored Procedures from the tree. Display the Summary Window. In the Summary Window you can select more than one to delete.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
no problem.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
One of our developers just came up and asked me how to select multiple SPs. Thanks, Denny. You saved me a lot of searching.

Have a star. Not as tasty as a cookie, but definately prettier. @=)



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top