|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to list all Triggers with SQL 2005 like sp_tables or sp_databases?Hello,
how can I list all Triggers like sp_tables or sp_databases? Thanks for any help in advance! Regards, Andreas Klemt Hi,
fromthe procedure text of sp_helptrigger: select trigger_name = name, trigger_owner = user_name(uid), isupdate = ObjectProperty( id, 'ExecIsUpdateTrigger'), isdelete = ObjectProperty( id, 'ExecIsDeleteTrigger'), isinsert = ObjectProperty( id, 'ExecIsInsertTrigger'), isafter = ObjectProperty( id, 'ExecIsAfterTrigger'), isinsteadof = ObjectProperty( id, 'ExecIsInsteadOfTrigger') from sysobjects where type = 'TR' HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- Hello Jens,
thank you very much! Is there a way with a stored proc to list all the trigger codes at once? Kind Regards Andreas Klemt Show quote "Jens" <J***@sqlserver2005.de> schrieb im Newsbeitrag news:1143105929.558246.57750@i39g2000cwa.googlegroups.com... > Hi, > > fromthe procedure text of sp_helptrigger: > > > select > trigger_name = name, > trigger_owner = user_name(uid), > isupdate = ObjectProperty( id, 'ExecIsUpdateTrigger'), > isdelete = ObjectProperty( id, 'ExecIsDeleteTrigger'), > isinsert = ObjectProperty( id, 'ExecIsInsertTrigger'), > isafter = ObjectProperty( id, 'ExecIsAfterTrigger'), > isinsteadof = ObjectProperty( id, 'ExecIsInsteadOfTrigger') > from sysobjects > where type = 'TR' > > HTH, Jens Suessmeyer. > > --- > http://www.sqlserver2005.de > --- > Add Object_Definition(id) to the select list.
Show quote "Andreas Klemt" <aklem***@hotmail.com> wrote in message news:OspiUylTGHA.5172@TK2MSFTNGP12.phx.gbl... > Hello Jens, > > thank you very much! > > Is there a way with a stored proc to list all the trigger codes at once? Hello Aaron,
thank you! Is there a way to put a code in the stored proc that the results are shown as "Results to Text" instead of "Results to grid" ? Kind Regards Andreas Klemt Show quote "Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> schrieb im Newsbeitrag news:uov9xomTGHA.4436@TK2MSFTNGP10.phx.gbl... > Add Object_Definition(id) to the select list. > > > "Andreas Klemt" <aklem***@hotmail.com> wrote in message > news:OspiUylTGHA.5172@TK2MSFTNGP12.phx.gbl... >> Hello Jens, >> >> thank you very much! >> >> Is there a way with a stored proc to list all the trigger codes at once? > > How the client application (e.g. Query Analyzer) handles the result-sets is
not controlled by the stored procedure. You decide how you want your results displayed in QA by selecting the appropriate option. ML --- http://milambda.blogspot.com/ |
|||||||||||||||||||||||