USE myDBName GO DECLARE @procedureName varchar(500) DECLARE cur CURSOR FOR SELECT [name] FROM sys.objects WHERE type = 'p' OPEN cur FETCH NEXT FROM cur INTO @procedureName WHILE @@fetch_status = 0 BEGIN EXEC('DROP PROCEDURE ' + @procedureName) FETCH NEXT FROM cur INTO @procedureName END CLOSE cur DEALLOCATE curAll the best!
Saturday, September 3, 2011
Delete all stored procedures of a database in sql server
Sometimes there arises the need of deleting all stored procedures of a database. I came across the same situation when I was generating CRUD operations stored procedures via third party tool. I once changed a table and then had to regenerate all the stored procedures. So went on to find out the way. And ultimately stumbled at http://ctrlf5.net/?p=164.
Here is how to delete all the stored procedures of a sql server database:
Labels:
SQL Server 2005
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Most of the times programmers fill the DataTable from database. This action fills the schema of the database table into the DataTable . We ...
-
I have found much tricks in different tutorials and forums on opening new window in asp.net web page, using JavaScript, jquery etc. Here I h...
-
The asp.net Eval() and Bind() expressions are heavily used in asp.net GridView and DetailsView data bound controls. The difference between ...
-
I have oracle database installed in my computer. My Operating system is XP. I wrote an application in asp.net. It connected to oracle databa...
-
Last time I got the following error: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related ...
-
Last time we talked about Refreshing the parent page from child window in asp.net using javascript . This technique is useful in many scenar...
-
We do have a folder (and a number of sub folders) with a number of various files in those folders (and sub folders). Now we do need to list ...
-
In this post, I am explaining the button click functionality on key press in a textbox. I am using javascript to link the input textbox and ...
-
Much often we open child windows from parent web page . In the child page we perform some activities, and later close the window. At the ver...
-
The default behaviour of asp.net gridview is that it hides both Gridview header and footer when no data is present. You can note the absence...
0 comments:
Post a Comment
Hope you liked this post. You can leave your message or you can put your valuable suggestions on this post here. Thanks for the sharing and cooperation!