September 5, 2002 at 9:55 am
Hi !!!
I want generate sql script with all triggers of a database in Enterprise Manager, but i don´t tables in script.
I want only all triggers.
Is possible ?
P.s. In SQL Server 6.5 was possible !
Thanks .
Adriana
September 5, 2002 at 10:33 am
Dont think so, you can do it from Query Analyzer.
Andy
September 6, 2002 at 4:00 am
For some reason this was removed in EM in 7 and 2000 (may want to make a request to MS for this option). Now as for what Andy stated you need to use the sysobjects table and syscomments table to get the name and text based on being a trigger similar to so.
SELECT [name], [text] FROM sysobjects obj INNER JOIN syscomments com ON com.[id] = obj.[id] WHERE xtype IN ('TR')
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
September 6, 2002 at 5:55 am
You can actually script out the trigger directly by using the Object Browser to locate it, right click, script as create, alter, etc
Andy
September 6, 2002 at 7:03 am
quote:
For some reason this was removed in EM in 7 and 2000 (may want to make a request to MS for this option). Now as for what Andy stated you need to use the sysobjects table and syscomments table to get the name and text based on being a trigger similar to so.SELECT [name], [text] FROM sysobjects obj INNER JOIN syscomments com ON com.[id] = obj.[id] WHERE xtype IN ('TR')
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply