Last post Feb 16, 2012 06:44 AM by Chen Yu - MSFT
Feb 11, 2012 06:34 AM|jameerasp.net|LINK
in sql server2008 i created one trigger with name "inst_trigger"
when i check wheteher trigger created or not, it is showing the trigger "inst_trigger" in sys.triggers table
to alter that existing "inst_trigger" trigger iam unable to find out that trigger in object explorer of related database,
so can anybody provide info how to find out existing trigger in sql server 2008 fro altering purpose.
thanks in advance
Feb 11, 2012 06:42 AM|Muhammad Fakhr Elden Sami|LINK
I think you can use generate scripts feature in SQL server as follows
Click you DB name > RightClick > Tasks > generate Scripts > choose the table(s) that may have trigger(s) associated > in the last step you will find
Advanced button > under Table/View options properties section you will find
script trigger option > make it true
And you will get the table(s) and trigger(s) script
Feb 11, 2012 07:37 AM|sandeepmittal11|LINK
Use this command. If there would be trigger with name "inst_trigger", this would give you the text of the trigger else you would get the error msg like "The object 'inst_trigger' does not exist"
Feb 13, 2012 12:16 PM|nilsan|LINK
If you've create your trigger for specific table, then you must click the plus button for that table and you'll be able to see trigger folder. There you can find your trigger. I hope it helps!
Feb 16, 2012 06:44 AM|Chen Yu - MSFT|LINK
iam unable to find out that trigger in object explorer of related database,
You could use below query to find "inst_trigger" is in which table.
select o.name as Trigger_name,quotename(s.name)+'.'+quotename(object_name(o.parent_obj))as Tablename
from sys.sql_modules m join sys.sysobjects o on m.object_id=o.id
join sys.schemas s on s.schema_id = o.uid
where o.name = 'inst_trigger'
If you want to find all database's trigger, please follow below link.