 




<?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: Execute trigger only on update of selected fields</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 22:12:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-86028</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 04 Jan 2011 01:00:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-86028</guid>
		<description><![CDATA[&lt;i&gt;I open the output file&lt;/i&gt;

Ideally, you only open the output file the first time a change is discovered. Then you leave it open when you return from the trigger so you don&#039;t open/close the file for every detected change.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I open the output file</i></p>
<p>Ideally, you only open the output file the first time a change is discovered. Then you leave it open when you return from the trigger so you don&#8217;t open/close the file for every detected change.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r.otto</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-86010</link>
		<dc:creator>r.otto</dc:creator>
		<pubDate>Mon, 03 Jan 2011 10:41:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-86010</guid>
		<description><![CDATA[Thank for your help.
I created a COBOL program that compares old and new fields on an update. If any of the fields that need to go to the Oracle system has changed I open the output file and write a record. If not I just end the program.]]></description>
		<content:encoded><![CDATA[<p>Thank for your help.<br />
I created a COBOL program that compares old and new fields on an update. If any of the fields that need to go to the Oracle system has changed I open the output file and write a record. If not I just end the program.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-85816</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 27 Dec 2010 23:16:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-85816</guid>
		<description><![CDATA[&lt;i&gt;You can compare the specific fields from the before and after images in the trigger program...&lt;/i&gt;

That is indeed true. But it might be that that&#039;s exactly what should be avoided.

&lt;i&gt;...and saves the &lt;b&gt;Oracle &lt;/b&gt;system from getting 1.5 million changes.&lt;/i&gt;

Then again, maybe that&#039;s the critical piece of info -- &quot;Oracle&quot;. Maybe the &#039;6 hours&#039; is mostly due to some element of network traffic over to the Oracle system. If the COBOL trigger program simply returns when the only changes are to the &#039;workfields&#039;, a lot of delay might be eliminated.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>You can compare the specific fields from the before and after images in the trigger program&#8230;</i></p>
<p>That is indeed true. But it might be that that&#8217;s exactly what should be avoided.</p>
<p><i>&#8230;and saves the <b>Oracle </b>system from getting 1.5 million changes.</i></p>
<p>Then again, maybe that&#8217;s the critical piece of info &#8212; &#8220;Oracle&#8221;. Maybe the &#8217;6 hours&#8217; is mostly due to some element of network traffic over to the Oracle system. If the COBOL trigger program simply returns when the only changes are to the &#8216;workfields&#8217;, a lot of delay might be eliminated.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: splat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-85808</link>
		<dc:creator>splat</dc:creator>
		<pubDate>Mon, 27 Dec 2010 17:39:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-85808</guid>
		<description><![CDATA[You can compare the specific fields from the before and after images in the trigger program, exiting if there are no differences between them.  The trigger program is still run, but updates will only occur when your specified fields show a change.  I did something similar a few years ago.  One thing to consider is when or if you need to open any files - if you&#039;re not going to update anything, there&#039;s not benefit in having that overhead.]]></description>
		<content:encoded><![CDATA[<p>You can compare the specific fields from the before and after images in the trigger program, exiting if there are no differences between them.  The trigger program is still run, but updates will only occur when your specified fields show a change.  I did something similar a few years ago.  One thing to consider is when or if you need to open any files &#8211; if you&#8217;re not going to update anything, there&#8217;s not benefit in having that overhead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-85725</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 23 Dec 2010 23:07:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-85725</guid>
		<description><![CDATA[And it still takes 6 hours even if the trigger is disabled? You can use the CHGPFTRG command to disable and re-enable a trigger.

Tom]]></description>
		<content:encoded><![CDATA[<p>And it still takes 6 hours even if the trigger is disabled? You can use the CHGPFTRG command to disable and re-enable a trigger.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r.otto</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-85710</link>
		<dc:creator>r.otto</dc:creator>
		<pubDate>Thu, 23 Dec 2010 14:57:37 +0000</pubDate>
		<guid isPermaLink="false">#comment-85710</guid>
		<description><![CDATA[We are not programming in SQL ourselves. This was originated by someone who was hired by another department to design a system for them and he needed all changes to a membership file to keep his data up-to-date. The file has 1.5 million records and contains some workfields. Through SQL he generated the triggers and the trigger programs. Now if we update those workfields it takes about 6 hours to complete and he does not need those (and some other) fields. Without the trigger it takes some 20 minutes and saves the Oracle system from getting 1.5 million changes.
What we did is write a trigger program in COBOL but we would like it to be executed only when selected fields are updated or when a record is inserted.]]></description>
		<content:encoded><![CDATA[<p>We are not programming in SQL ourselves. This was originated by someone who was hired by another department to design a system for them and he needed all changes to a membership file to keep his data up-to-date. The file has 1.5 million records and contains some workfields. Through SQL he generated the triggers and the trigger programs. Now if we update those workfields it takes about 6 hours to complete and he does not need those (and some other) fields. Without the trigger it takes some 20 minutes and saves the Oracle system from getting 1.5 million changes.<br />
What we did is write a trigger program in COBOL but we would like it to be executed only when selected fields are updated or when a record is inserted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/execute-trigger-only-on-update-of-selected-fields/#comment-85689</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 23 Dec 2010 00:44:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-85689</guid>
		<description><![CDATA[Is it required that the trigger actually be removed? Why not just disable it? Also, if it must be removed, why not store the trigger definition somewhere, e.g., in a source member, and simply RUNSQLSTM to recreate and reapply it?

Tom]]></description>
		<content:encoded><![CDATA[<p>Is it required that the trigger actually be removed? Why not just disable it? Also, if it must be removed, why not store the trigger definition somewhere, e.g., in a source member, and simply RUNSQLSTM to recreate and reapply it?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.039 seconds using memcached
Object Caching 351/357 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 22:22:07 -->