Professional Web Applications Themes

viewing triggers? - Microsoft SQL / MS SQL Server

How can I view all triggers for a table? I am exporting a production table to a test machine and need to make sure that all triggers have been copied. TIA, Adria...

  1. #1

    Default viewing triggers?

    How can I view all triggers for a table? I am exporting a
    production table to a test machine and need to make sure
    that all triggers have been copied.

    TIA,
    Adria
    Adria Guest

  2. #2

    Default Re: viewing triggers?

    EXEC sp_helptrigger <tablename>
    will return the types of triggers that are defined on the specified table
    for the current database

    -Vishal

    "Adria" <a-carbotamu.edu> wrote in message
    news:25b801c33f29$e8d49200$a601280aphx.gbl...
    > How can I view all triggers for a table? I am exporting a
    > production table to a test machine and need to make sure
    > that all triggers have been copied.
    >
    > TIA,
    > Adria

    Vishal Parkar Guest

  3. #3

    Default Re: viewing triggers?

    You can use the system procedure sp_helptrigger 'tablename'

    Otherwise, if you are using Enterprise Manager, there are several ways to
    access trigger information. One of those would be via the context menu of
    your table > All Tasks > Manage Triggers.

    --Drew

    "Adria" <a-carbotamu.edu> wrote in message
    news:25b801c33f29$e8d49200$a601280aphx.gbl...
    > How can I view all triggers for a table? I am exporting a
    > production table to a test machine and need to make sure
    > that all triggers have been copied.
    >
    > TIA,
    > Adria

    Drew Seale Guest

  4. #4

    Default Re: viewing triggers?

    Adria,

    --For a single table
    sp_helptrigger 'tablename'


    --For all the triggers in the database
    SELECT [name] AS 'Trigger Name' , OBJECT_NAME(parent_obj) AS 'Table Name'
    FROM sysobjects
    WHERE xtype = 'tr'

    --
    Dinesh.
    SQL Server FAQ at
    [url]http://www.tkdinesh.com[/url]

    "Adria" <a-carbotamu.edu> wrote in message
    news:25b801c33f29$e8d49200$a601280aphx.gbl...
    > How can I view all triggers for a table? I am exporting a
    > production table to a test machine and need to make sure
    > that all triggers have been copied.
    >
    > TIA,
    > Adria

    Dinesh.T.K Guest

Similar Threads

  1. update in triggers
    By Jamie Deppeler in forum PostgreSQL / PGSQL
    Replies: 5
    Last Post: January 19th, 12:31 PM
  2. triggers in DB2
    By Piotr in forum IBM DB2
    Replies: 2
    Last Post: August 27th, 03:37 PM
  3. Triggers
    By P. Saint-Jacques in forum IBM DB2
    Replies: 0
    Last Post: August 8th, 02:30 AM
  4. Help with triggers
    By W Gemini in forum IBM DB2
    Replies: 0
    Last Post: August 7th, 11:45 AM
  5. Diabled Triggers
    By BAbu in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 12th, 08:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139