<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQL Database Triggers</title>
	<atom:link href="http://thomaslarock.com/2009/03/sql-database-triggers/feed/" rel="self" type="application/rss+xml" />
	<link>http://thomaslarock.com/2009/03/sql-database-triggers/</link>
	<description>World domination.</description>
	<lastBuildDate>Thu, 11 Mar 2010 23:30:49 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Thomas LaRock</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-11660</link>
		<dc:creator>Thomas LaRock</dc:creator>
		<pubDate>Thu, 19 Nov 2009 03:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-11660</guid>
		<description>Thanks for your reply. You are right, it is not triggers that are bad per se. It is more about the fact that they are difficult to work with, especially with the graphical tools currently at our disposal.

We were unit testing code and would not see expected results as a result of triggers that were being used to enforce business logic. triggers are often a hidden layer of code that can be difficult to think about when you are unit testing application code.

i&#039;m not sure that our triggers were badly written, or were ever the cause of a bug, and if that was the message you got from my blog post then I apologize for not being able to make things more clear the first time around. the point i wanted to make is that they can be a forgotten piece of logic when you are doing unit testing.

you can decide for yourself about stored procedures. i happen to know a handful of people that would prefer to use nothing but dynamic SQL in web pages. everyone has their own comfort zone, i suppose.</description>
		<content:encoded><![CDATA[<p>Thanks for your reply. You are right, it is not triggers that are bad per se. It is more about the fact that they are difficult to work with, especially with the graphical tools currently at our disposal.</p>
<p>We were unit testing code and would not see expected results as a result of triggers that were being used to enforce business logic. triggers are often a hidden layer of code that can be difficult to think about when you are unit testing application code.</p>
<p>i&#8217;m not sure that our triggers were badly written, or were ever the cause of a bug, and if that was the message you got from my blog post then I apologize for not being able to make things more clear the first time around. the point i wanted to make is that they can be a forgotten piece of logic when you are doing unit testing.</p>
<p>you can decide for yourself about stored procedures. i happen to know a handful of people that would prefer to use nothing but dynamic SQL in web pages. everyone has their own comfort zone, i suppose.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sqlblindman</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-11651</link>
		<dc:creator>sqlblindman</dc:creator>
		<pubDate>Wed, 18 Nov 2009 17:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-11651</guid>
		<description>The fact that you and your former colleagues did not know how to properly write or use triggers does not mean triggers are bad.  If you were using triggers to enforce referential integrity that indicates a fault in either your database design or your architecture.  Quit blaming the tool.

The fact that triggers were &quot;always the last thing we would think about&quot; when tracking bugs indicates just how rarely triggers were the cause of your bugs.

I find more bugs in stored procedures than triggers.  Should we stop using those as well?</description>
		<content:encoded><![CDATA[<p>The fact that you and your former colleagues did not know how to properly write or use triggers does not mean triggers are bad.  If you were using triggers to enforce referential integrity that indicates a fault in either your database design or your architecture.  Quit blaming the tool.</p>
<p>The fact that triggers were &#8220;always the last thing we would think about&#8221; when tracking bugs indicates just how rarely triggers were the cause of your bugs.</p>
<p>I find more bugs in stored procedures than triggers.  Should we stop using those as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Turn Off NOCOUNT &#124; SQLBatman.com</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1504</link>
		<dc:creator>Turn Off NOCOUNT &#124; SQLBatman.com</dc:creator>
		<pubDate>Tue, 17 Mar 2009 20:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1504</guid>
		<description>[...] boost performance with triggers, so perhaps that is at play here as well. But since we already know how I feel about triggers, I will not accept that as a valid reason for this instance wide configuration option. I would much [...]</description>
		<content:encoded><![CDATA[<p>[...] boost performance with triggers, so perhaps that is at play here as well. But since we already know how I feel about triggers, I will not accept that as a valid reason for this instance wide configuration option. I would much [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLBatman</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1260</link>
		<dc:creator>SQLBatman</dc:creator>
		<pubDate>Thu, 05 Mar 2009 14:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1260</guid>
		<description>That is similar to some of the workarounds I have seen (or done) in the past in order to help troubleshoot data issues.</description>
		<content:encoded><![CDATA[<p>That is similar to some of the workarounds I have seen (or done) in the past in order to help troubleshoot data issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Dragon</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1259</link>
		<dc:creator>Matt Dragon</dc:creator>
		<pubDate>Thu, 05 Mar 2009 13:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1259</guid>
		<description>We&#039;ve actually started to move to having Triggers use their own UserID when making changes to data.  Our database already has Last Change and Creation tracking columns, as well as audit tables (the only valid reason I&#039;ve ever really seen for using triggers).  If a trigger blames its change on User A you have no way of knowing what really caused the data to change.  However, if the trigger blames itself you can  always back track to the real change that fired the trigger.</description>
		<content:encoded><![CDATA[<p>We&#8217;ve actually started to move to having Triggers use their own UserID when making changes to data.  Our database already has Last Change and Creation tracking columns, as well as audit tables (the only valid reason I&#8217;ve ever really seen for using triggers).  If a trigger blames its change on User A you have no way of knowing what really caused the data to change.  However, if the trigger blames itself you can  always back track to the real change that fired the trigger.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Why Are You Surprised? &#124; SQLBatman.com</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1239</link>
		<dc:creator>Why Are You Surprised? &#124; SQLBatman.com</dc:creator>
		<pubDate>Wed, 04 Mar 2009 16:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1239</guid>
		<description>[...] Or designed a database one way only to realize that there was a better, simpler design, one free of triggers and [...]</description>
		<content:encoded><![CDATA[<p>[...] Or designed a database one way only to realize that there was a better, simpler design, one free of triggers and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL Server and NULL Values &#124; SQLBatman.com</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1225</link>
		<dc:creator>SQL Server and NULL Values &#124; SQLBatman.com</dc:creator>
		<pubDate>Tue, 03 Mar 2009 19:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1225</guid>
		<description>[...] seemed to have struck a minor chord with my hatred for database triggers. I had very few comments, but a handful of emails and exchanged even more tweets on the subject. [...]</description>
		<content:encoded><![CDATA[<p>[...] seemed to have struck a minor chord with my hatred for database triggers. I had very few comments, but a handful of emails and exchanged even more tweets on the subject. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meeting Minutes for Trigger Design &#124; Brent Ozar - SQL Server DBA</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1219</link>
		<dc:creator>Meeting Minutes for Trigger Design &#124; Brent Ozar - SQL Server DBA</dc:creator>
		<pubDate>Tue, 03 Mar 2009 13:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1219</guid>
		<description>[...] wrote recently about how database triggers suck.  It&#8217;s pretty funny, and it made me stop to think.  What would it have been like to sit in [...]</description>
		<content:encoded><![CDATA[<p>[...] wrote recently about how database triggers suck.  It&#8217;s pretty funny, and it made me stop to think.  What would it have been like to sit in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1200</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 02 Mar 2009 17:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1200</guid>
		<description>Amen brother!</description>
		<content:encoded><![CDATA[<p>Amen brother!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: K. Brian Kelley</title>
		<link>http://thomaslarock.com/2009/03/sql-database-triggers/comment-page-1/#comment-1199</link>
		<dc:creator>K. Brian Kelley</dc:creator>
		<pubDate>Mon, 02 Mar 2009 14:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://sqlbatman.com/?p=1063#comment-1199</guid>
		<description>Triggers are great for writing articles about (having done that). They are also great for retrofitting a database with auditing when you have to have auditing and you can&#039;t (aren&#039;t allowed) to make any other changes and you aren&#039;t allowed (can&#039;t afford) to purchase another tool for the same purpose. But in this case you accept the trade-off of the problems you&#039;ve mentioned above in order to get the auditing you want. 

Otherwise, I&#039;ve advised to my developers that if you want that kind of auditing, etc., build it in the stored procedures or into the application logic so it&#039;s visible when troubleshooting, as you&#039;ve mentioned. 

But you need to write that post on NULLs.</description>
		<content:encoded><![CDATA[<p>Triggers are great for writing articles about (having done that). They are also great for retrofitting a database with auditing when you have to have auditing and you can&#8217;t (aren&#8217;t allowed) to make any other changes and you aren&#8217;t allowed (can&#8217;t afford) to purchase another tool for the same purpose. But in this case you accept the trade-off of the problems you&#8217;ve mentioned above in order to get the auditing you want. </p>
<p>Otherwise, I&#8217;ve advised to my developers that if you want that kind of auditing, etc., build it in the stored procedures or into the application logic so it&#8217;s visible when troubleshooting, as you&#8217;ve mentioned. </p>
<p>But you need to write that post on NULLs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
