Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: More questions on triggers Date: Thu, 28 Apr 2011 00:02:07 +0200 Organization: Erland Sommarskog Lines: 31 Message-ID: References: <873a9524-fb27-434b-bfd4-57616cfbec4b@w36g2000vbi.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="DD6dU+BfJNjsjSP4/K/V7w"; logging-data="20771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KQXx9KrCLi0zMZOsCGY/M" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:kTAVt5LF8NaAGOc/zVPFADB5FIc= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:266 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