Groups | Blog | Home
all groups > sql server mseq > august 2003 >

sql server mseq : DROP TRIGGER TROUBLE



HECTOR
8/28/2003 2:56:17 PM
I wrote a trigger and now I want to use "DROP TRIGGER" to
delete it, but it returns me:

"Cannot drop the trigger 'AlertaAl', because it does not
exist in the system catalog."

But if I execute "select * from sysobjects where type='TR'"
It shows me my TRIGGER.

Even if I want to create another trigger with the same
name 'AlertaAl', it returns me:

"There is already an object named 'AlertaAl' in the
database."

Pls. Help me.

Vishal Parkar
8/29/2003 4:20:30 AM
--check the owner of the trigger probably it might have been created by
another user.
--to find the owner of the trigger fire following query
select o.name, owner = user_name(o.uid)
from sysobjects o where name like <trigger name> --trigger name

--command to drop the trigger.

DROP TRIGGER [owner].[trigger_name]

--
-Vishal

[quoted text, click to view]

AddThis Social Bookmark Button