Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET NOCOUNT ON
- select 'DROP TRIGGER [dbo].[' + t.name + '];'
- from sys.triggers t
- join sys.tables o
- on o.object_id = t.parent_id
- where t.name like '%Replicate'
- order by t.name
- select 'DROP PROCEDURE [' + o.name + '];'
- from sys.objects o
- where type in (N'P', N'PC')
- and o.name LIKE 'ReplIup%' OR o.name LIKE 'ReplDel%'
- --drop _all views
- select 'DROP VIEW [' + o.name + '];'
- from sys.views o
- where o.name LIKE '%_all'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement