Re: Removing triggers

From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 03/05/04


Date: Fri, 5 Mar 2004 10:12:34 -0600

I will have to assume you know what you are talking about, since what you
are suggesting sounds pretty strange.

To build a script, you can do something like:

--demo table
create table test
(
 value int
)
go
--demo trigger
create trigger test$insert
on test
after insert
as
 begin
 declare @noop int
 end
go

--this will generate a script
select 'drop trigger ' + name
from sysobjects
where name like 'test$%'
  and objectproperty(id,'istrigger') = 1

-- 
----------------------------------------------------------------------------
-----------
Louis Davidson (drsql@hotmail.com)
Compass Technology Management
Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are
interested in consulting services.  All other replies will be ignored :)
"Sam Moayedi" <anonymous@discussions.microsoft.com> wrote in message
news:A6431B81-1E44-4E42-B8D9-FB7371B4A9D6@microsoft.com...
> We have a Third part software which activates 3 trigger for each table,
when I restore production server which does not have this application start
getting error with these triggers.
> Is there any easy way to remove all of these triggers on backup server?
> They all start with specific key word (easy to identify)


Relevant Pages

  • Re: Flexibility of Eventriggers in Win2003 - query on source + wil
    ... I created a very broad event trigger that looks only at entries of /EID ... The event trigger runs a batch file that then calls a vbs script that uses ... Namely to tweak it so that it will check to see if it has sent the admin ...
    (microsoft.public.windows.server.general)
  • Script endlessly looping
    ... The following script has a loop that executes ftp to look for a trigger ... trigger file and renames the data file on the remote server. ...
    (comp.unix.shell)
  • Re: How do I to make a Script avoid being blocked by popup blocker
    ... Using RegisterStartupScript means it is not triggered ... You may have had the user click to trigger a postback, ... had a startup script, however, that means the user triggered a postback, not ... often what triggers the popup blocker to block it. ...
    (microsoft.public.vsnet.general)
  • Re: [2.6.27] filesystem (ext3) corruption (access beyond end)
    ... Ok I ran several disk-intensive jobs (git clone, kernel build, apt-get dist-upgrade) ... but none of those could trigger any bugs. ... BUT, running my http://vanheusden.com/pyk/ script, I definately can trigger the ...
    (Linux-Kernel)
  • Re: getting data in triggers
    ... > script from the trigger. ... > our clients would get a "page cannot be displayed" error when the try to ... > dim UserExist, strAbbrev, strName, strPwd, strType ...
    (microsoft.public.sqlserver.programming)