Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #266

Re: More questions on triggers

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: More questions on triggers
Date 2011-04-28 00:02 +0200
Organization Erland Sommarskog
Message-ID <Xns9ED55C39C1EYazorman@127.0.0.1> (permalink)
References <873a9524-fb27-434b-bfd4-57616cfbec4b@w36g2000vbi.googlegroups.com>

Show all headers | View raw


Dom (dolivastro@gmail.com) writes:
> 1.  Where are triggers shown on the Object Explorer in SSMS?  I
> thought they would be listed under "Programmability ... Database
> Triggers" but they aren't there.

They are shown under the table they belong to. The node under 
Programmability is for DDL trggiers.
 
> 2.  Is there a GUI to create a trigger, like there is to create a
> table?  I've been using straight SQL for this.

That's the way to do it. For both tables and triggers. The Table Designer is 
a piece of crap.
 
> 3.  How do you modify a trigger?  I've been using sp_helptrigger to
> get the trigger name (since I can't find it anywhere in SSMS), and
> then sp_helptext to get the SQL of the trigger.
 
Like any other source code, you should keep your SQL code under version 
control. In that case it's simple. You go to your version-control system
and check it out. Yeah, you can script things from the database, but
that is like disassembling your object files to edit your C# code.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Find similar


Thread

More questions on triggers Dom <dolivastro@gmail.com> - 2011-04-27 06:02 -0700
  Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 15:16 +0200
    Re: More questions on triggers Dom <dolivastro@gmail.com> - 2011-04-27 06:26 -0700
      Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 15:30 +0200
        Re: More questions on triggers Dom <dolivastro@gmail.com> - 2011-04-27 06:34 -0700
          Re: More questions on triggers Dom <dolivastro@gmail.com> - 2011-04-27 06:35 -0700
          Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 15:35 +0200
  Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 15:27 +0200
  Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 15:27 +0200
  Re: More questions on triggers "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2011-04-27 10:24 -0400
    Re: More questions on triggers Dom <dolivastro@gmail.com> - 2011-04-27 07:36 -0700
    Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 16:41 +0200
      Re: More questions on triggers Dom <dolivastro@gmail.com> - 2011-04-27 07:44 -0700
        Re: More questions on triggers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-27 18:48 +0200
  Re: More questions on triggers Erland Sommarskog <esquel@sommarskog.se> - 2011-04-28 00:02 +0200

csiph-web