I have observed that his script won't delete stored procedure which has space in it.
Example: If stored procedure name is like "Category Insert" i.e. Procedure which has space in its name.
I have make line bold wherein i have add bracket to support this.
declare @procName sysname
declare someCursor cursor for select name from sysobjects where type = 'P' and objectproperty(id, 'IsMSShipped') = 0
open someCursor fetch next from someCursor into @procName while @@FETCH_STATUS = 0 begin exec('drop proc [' + @procName + ']') fetch next from someCursor into @procName end
No comments:
Post a Comment