Run the query below to get the delete object script. Then run it repeatedly till nothing is left. Because there might be dependencies between objects, some objects might be left behind the first time you run this.
select dropCmd= 'if object_id(''' + name + ''') is not null drop ' + case when xtype= 'P' then 'procedure' when xtype = 'U' then 'table' when xtype = 'FN' or xtype = 'TF' then 'function' when xtype = 'V' then 'view' else ' ******unhandled object type ****** 'end + ' dbo.' + name from sysobjects where name like 'dnn%_'
No comments:
Post a Comment