<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Disadvantages (Problems) of Triggers</title>
	<atom:link href="http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 10:40:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: skmishra202</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-242570</link>
		<dc:creator><![CDATA[skmishra202]]></dc:creator>
		<pubDate>Mon, 23 Jan 2012 10:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-242570</guid>
		<description><![CDATA[Thanks for nice article]]></description>
		<content:encoded><![CDATA[<p>Thanks for nice article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: munirajan</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-239991</link>
		<dc:creator><![CDATA[munirajan]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 05:11:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-239991</guid>
		<description><![CDATA[hi 
hard to say...

kindly eradicate the application in the below content ...

Triggers execute invisible to client-application application. They are not visible or can be traced in debugging code.

Dont mistake me sir
Munirajan.T]]></description>
		<content:encoded><![CDATA[<p>hi<br />
hard to say&#8230;</p>
<p>kindly eradicate the application in the below content &#8230;</p>
<p>Triggers execute invisible to client-application application. They are not visible or can be traced in debugging code.</p>
<p>Dont mistake me sir<br />
Munirajan.T</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Significance of Various Kinds of Triggers- Quiz &#8211; Puzzle &#8211; 2 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-230358</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Significance of Various Kinds of Triggers- Quiz &#8211; Puzzle &#8211; 2 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Tue, 03 Jan 2012 01:31:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-230358</guid>
		<description><![CDATA[[...] Server Interview Questions and Answers ISBN: 1466405643 Page#24-25 Disadvantages (Problems) of Triggers Server and Database Level DDL Triggers Examples and Explanation Disable All Triggers on a Database [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Server Interview Questions and Answers ISBN: 1466405643 Page#24-25 Disadvantages (Problems) of Triggers Server and Database Level DDL Triggers Examples and Explanation Disable All Triggers on a Database [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Gupta</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-164238</link>
		<dc:creator><![CDATA[Shantanu Gupta]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 09:18:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-164238</guid>
		<description><![CDATA[Hi Pinal,

Just wanted to know about logging data modification.

I have seen to ways of tracking data change(DML). 
1. Using Triggers
2. Keeping columns in same table for Added Date, Added By, Modified Date, Modified By.

Using approach(1), I can write trigger for Insert/Delete/Update on each table to log changes and hence can apply Foreign key relationship and other constraints like Unique key constraints on all the tables as per requirement.

But I didn&#039;t understand how it is possible to apply various constrains using approach(2).
Since I have to make composite unique key and have to consider many more columns.

Is there any design issues in database tables. What is the suggested way for approach(2) to log data.

Which approach is better.

Also I have come to know from some of my collegues that Triggers do no fires on bulk insert queries is it true.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Just wanted to know about logging data modification.</p>
<p>I have seen to ways of tracking data change(DML).<br />
1. Using Triggers<br />
2. Keeping columns in same table for Added Date, Added By, Modified Date, Modified By.</p>
<p>Using approach(1), I can write trigger for Insert/Delete/Update on each table to log changes and hence can apply Foreign key relationship and other constraints like Unique key constraints on all the tables as per requirement.</p>
<p>But I didn&#8217;t understand how it is possible to apply various constrains using approach(2).<br />
Since I have to make composite unique key and have to consider many more columns.</p>
<p>Is there any design issues in database tables. What is the suggested way for approach(2) to log data.</p>
<p>Which approach is better.</p>
<p>Also I have come to know from some of my collegues that Triggers do no fires on bulk insert queries is it true.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronen</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-156100</link>
		<dc:creator><![CDATA[Ronen]]></dc:creator>
		<pubDate>Thu, 11 Aug 2011 07:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-156100</guid>
		<description><![CDATA[Hello, 
How can I we get the values of the records being updated on the Table and not get updated due to Where Condition 
CREATE TABLE [dbo].[Test](
	[id] [bigint] NULL,
	[description] [varchar](50) NULL
)
GO
INSERT INTO [dbo].[Test]([id],[ description])
Values (1,’SQL2005’)
GO
Update [Test] Set [description] = ‘SQL2008’ where [ID] = 3
In above case I need to write a trigger where I can find the Value of Field Description Which is SQL2008, 
Instead of Trigger gives the values but only if the Records are updated]]></description>
		<content:encoded><![CDATA[<p>Hello,<br />
How can I we get the values of the records being updated on the Table and not get updated due to Where Condition<br />
CREATE TABLE [dbo].[Test](<br />
	[id] [bigint] NULL,<br />
	[description] [varchar](50) NULL<br />
)<br />
GO<br />
INSERT INTO [dbo].[Test]([id],[ description])<br />
Values (1,’SQL2005’)<br />
GO<br />
Update [Test] Set [description] = ‘SQL2008’ where [ID] = 3<br />
In above case I need to write a trigger where I can find the Value of Field Description Which is SQL2008,<br />
Instead of Trigger gives the values but only if the Records are updated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-134582</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 16 May 2011 10:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-134582</guid>
		<description><![CDATA[You can have it as part of INSERT trigger code]]></description>
		<content:encoded><![CDATA[<p>You can have it as part of INSERT trigger code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-134119</link>
		<dc:creator><![CDATA[Ali]]></dc:creator>
		<pubDate>Thu, 12 May 2011 11:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-134119</guid>
		<description><![CDATA[Hello,

How can we replace a trigger by a stored procedure?

A trigger fires on UPDATE / INSERT or DELETE statement, how can we execute the stored procedure after an insert?

Thank you.]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>How can we replace a trigger by a stored procedure?</p>
<p>A trigger fires on UPDATE / INSERT or DELETE statement, how can we execute the stored procedure after an insert?</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Afrina Hossain</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-126334</link>
		<dc:creator><![CDATA[Afrina Hossain]]></dc:creator>
		<pubDate>Sun, 03 Apr 2011 09:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-126334</guid>
		<description><![CDATA[Sir,
How can I maitain Audit Trail without using trigger???]]></description>
		<content:encoded><![CDATA[<p>Sir,<br />
How can I maitain Audit Trail without using trigger???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Forrest</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-123909</link>
		<dc:creator><![CDATA[Forrest]]></dc:creator>
		<pubDate>Sat, 19 Mar 2011 05:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-123909</guid>
		<description><![CDATA[It seems that Triggers are being used extensively EXACTLY for foreign key maintenance.

I still think there is wisdom in manually processing table links; especially if you are pruning dupes from the parent table, and don&#039;t want to loose referential integrity with the child tables.]]></description>
		<content:encoded><![CDATA[<p>It seems that Triggers are being used extensively EXACTLY for foreign key maintenance.</p>
<p>I still think there is wisdom in manually processing table links; especially if you are pruning dupes from the parent table, and don&#8217;t want to loose referential integrity with the child tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Forrest</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-123889</link>
		<dc:creator><![CDATA[Forrest]]></dc:creator>
		<pubDate>Sat, 19 Mar 2011 02:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-123889</guid>
		<description><![CDATA[Dave,

Thanks for the heads up - it sounds like people are using Triggers for things which they probably ought not to... for example cascading foreign key relationships.

I work in an environment where we do lots of bulk imports into clusters of child/parent tables, and if we had triggers going off each time we did anything we would have 1) a very slow environment, and 2) many many erroneous table links.

On the other hand - we also rely extensively on non-clustered indexes in order to make our reporting work in a realistic amount of time.

Is it appropriate to use a trigger to disable all table indexes before committing an UPDATE or INSERT statement, and then to rebuild the indexes AFTER the statement processes?

Thanks

Forrest]]></description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>Thanks for the heads up &#8211; it sounds like people are using Triggers for things which they probably ought not to&#8230; for example cascading foreign key relationships.</p>
<p>I work in an environment where we do lots of bulk imports into clusters of child/parent tables, and if we had triggers going off each time we did anything we would have 1) a very slow environment, and 2) many many erroneous table links.</p>
<p>On the other hand &#8211; we also rely extensively on non-clustered indexes in order to make our reporting work in a realistic amount of time.</p>
<p>Is it appropriate to use a trigger to disable all table indexes before committing an UPDATE or INSERT statement, and then to rebuild the indexes AFTER the statement processes?</p>
<p>Thanks</p>
<p>Forrest</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: srinivas</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-107158</link>
		<dc:creator><![CDATA[srinivas]]></dc:creator>
		<pubDate>Tue, 21 Dec 2010 12:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-107158</guid>
		<description><![CDATA[your explanation is super.]]></description>
		<content:encoded><![CDATA[<p>your explanation is super.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tranquilizer</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-88153</link>
		<dc:creator><![CDATA[Tranquilizer]]></dc:creator>
		<pubDate>Fri, 17 Sep 2010 20:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-88153</guid>
		<description><![CDATA[Pinal,

I totally agree with you on this.
To add to your thoughts, triggers are misused most of the times thereby affecting db performance. Also, all app logic should be part of the application process flow to keep things simple and visible like you said, which makes debugging easier as well.
I have trouble explaining this concept so some people.

Thanks for putting it in writing!]]></description>
		<content:encoded><![CDATA[<p>Pinal,</p>
<p>I totally agree with you on this.<br />
To add to your thoughts, triggers are misused most of the times thereby affecting db performance. Also, all app logic should be part of the application process flow to keep things simple and visible like you said, which makes debugging easier as well.<br />
I have trouble explaining this concept so some people.</p>
<p>Thanks for putting it in writing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajneesh</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-84714</link>
		<dc:creator><![CDATA[rajneesh]]></dc:creator>
		<pubDate>Fri, 20 Aug 2010 08:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-84714</guid>
		<description><![CDATA[use of instead of and after trigger..
after trigger u know already..
but instead of 
u can check constraint,suppose foreign key is not their then u can use.
this is old way.

exp:

alter trigger trg1 on emp1 instead of insert
as
declare @empid int;
select @empid=isnumeric(empid) from inserted;
if(@empid=1)
print(&#039;numeric&#039;);

else
print(&#039;not numeric&#039;);


Rajneesh Hajela Gwalior (M.P.)]]></description>
		<content:encoded><![CDATA[<p>use of instead of and after trigger..<br />
after trigger u know already..<br />
but instead of<br />
u can check constraint,suppose foreign key is not their then u can use.<br />
this is old way.</p>
<p>exp:</p>
<p>alter trigger trg1 on emp1 instead of insert<br />
as<br />
declare @empid int;<br />
select @empid=isnumeric(empid) from inserted;<br />
if(@empid=1)<br />
print(&#8216;numeric&#8217;);</p>
<p>else<br />
print(&#8216;not numeric&#8217;);</p>
<p>Rajneesh Hajela Gwalior (M.P.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shivlila</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-84416</link>
		<dc:creator><![CDATA[shivlila]]></dc:creator>
		<pubDate>Tue, 17 Aug 2010 13:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-84416</guid>
		<description><![CDATA[Very nice article. I agree whatever u wrote.]]></description>
		<content:encoded><![CDATA[<p>Very nice article. I agree whatever u wrote.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ammar</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-79559</link>
		<dc:creator><![CDATA[Ammar]]></dc:creator>
		<pubDate>Sat, 10 Jul 2010 02:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-79559</guid>
		<description><![CDATA[madhusudan sir,
If MSSQL server has any disadvantges that may cause ant error in compiling microsoft surely couldont produce a new version 2008 

are U understand me sir?]]></description>
		<content:encoded><![CDATA[<p>madhusudan sir,<br />
If MSSQL server has any disadvantges that may cause ant error in compiling microsoft surely couldont produce a new version 2008 </p>
<p>are U understand me sir?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gouse pasha</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-77879</link>
		<dc:creator><![CDATA[Gouse pasha]]></dc:creator>
		<pubDate>Mon, 28 Jun 2010 10:05:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-77879</guid>
		<description><![CDATA[Hi Subramanyam,

These two are related to DML triggers.

After triggers are executed after executing the DML events i.e.,the trigger adn the events both are executed.These triggers can be executed only on tables.

Instead of triggers are executed instead of executing the DML events i.e., the trigger is executed without executing the DML event.  These triggers can be executed on tables and views.]]></description>
		<content:encoded><![CDATA[<p>Hi Subramanyam,</p>
<p>These two are related to DML triggers.</p>
<p>After triggers are executed after executing the DML events i.e.,the trigger adn the events both are executed.These triggers can be executed only on tables.</p>
<p>Instead of triggers are executed instead of executing the DML events i.e., the trigger is executed without executing the DML event.  These triggers can be executed on tables and views.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhusudan</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-65386</link>
		<dc:creator><![CDATA[madhusudan]]></dc:creator>
		<pubDate>Sun, 18 Apr 2010 06:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-65386</guid>
		<description><![CDATA[any can tell me main disadvantage of sql server.]]></description>
		<content:encoded><![CDATA[<p>any can tell me main disadvantage of sql server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-64605</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Tue, 06 Apr 2010 18:25:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-64605</guid>
		<description><![CDATA[Hello Subramanyam,

As the name imply the code of AFTER trigger executes after completing the trigger firing statement while code of INSTEAD of tigger executes instead of firing statement.
AFTER triger is used mostly for implementing business logic and auditing while INSTEAD of trigger is used on updatable views.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Subramanyam,</p>
<p>As the name imply the code of AFTER trigger executes after completing the trigger firing statement while code of INSTEAD of tigger executes instead of firing statement.<br />
AFTER triger is used mostly for implementing business logic and auditing while INSTEAD of trigger is used on updatable views.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subramanyam</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-64485</link>
		<dc:creator><![CDATA[subramanyam]]></dc:creator>
		<pubDate>Mon, 05 Apr 2010 13:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-64485</guid>
		<description><![CDATA[sir plz tel me 


what is the difference between after triggers and insted of triggers. and also in which situation we use triggers...plz tel me]]></description>
		<content:encoded><![CDATA[<p>sir plz tel me </p>
<p>what is the difference between after triggers and insted of triggers. and also in which situation we use triggers&#8230;plz tel me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: herbey zepeda</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-59013</link>
		<dc:creator><![CDATA[herbey zepeda]]></dc:creator>
		<pubDate>Sat, 26 Dec 2009 22:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-59013</guid>
		<description><![CDATA[In the event where a primary needs to be generated on the fly, I can&#039;t see how can you do it without a trigger, unless you reove the primary key and run a stored rpc every time you insert anything, but it leaves us with the same scenario. I would think the greatest disadvantage is the difficulty to track or not &quot;forget&quot; that there is a little detail running behind the scenes...]]></description>
		<content:encoded><![CDATA[<p>In the event where a primary needs to be generated on the fly, I can&#8217;t see how can you do it without a trigger, unless you reove the primary key and run a stored rpc every time you insert anything, but it leaves us with the same scenario. I would think the greatest disadvantage is the difficulty to track or not &#8220;forget&#8221; that there is a little detail running behind the scenes&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-57619</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Sun, 15 Nov 2009 05:55:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-57619</guid>
		<description><![CDATA[@Bhadri.

Trigger is very powerful TSQL Command and should be used very carefully. 

You cant implement Parent-Child relation with foreign key constraint, if you have your parent table in one database and your child table in other database. In this case, you can use triggers to implement foreign key relation ship.

You cant have a check constraint on a table, if you want to check a value that refers to two other tables. You can implement the same with Triggers. (You can also use a combination of Check Constraint and a function to implement the same)

You can actually start a Job inside a Trigger. If any event occurs, and you want to set a response to that event, you can set it through a trigger. 

There are many more advantages of Triggers.

Starting from SQL Server 2005, We also DDL Triggers, there are NO if and No Buts to not use them... they are very very helpful... just take a look or google (DDL Triggers in SQL Server 2005) on web to know more about them.

~ IM.]]></description>
		<content:encoded><![CDATA[<p>@Bhadri.</p>
<p>Trigger is very powerful TSQL Command and should be used very carefully. </p>
<p>You cant implement Parent-Child relation with foreign key constraint, if you have your parent table in one database and your child table in other database. In this case, you can use triggers to implement foreign key relation ship.</p>
<p>You cant have a check constraint on a table, if you want to check a value that refers to two other tables. You can implement the same with Triggers. (You can also use a combination of Check Constraint and a function to implement the same)</p>
<p>You can actually start a Job inside a Trigger. If any event occurs, and you want to set a response to that event, you can set it through a trigger. </p>
<p>There are many more advantages of Triggers.</p>
<p>Starting from SQL Server 2005, We also DDL Triggers, there are NO if and No Buts to not use them&#8230; they are very very helpful&#8230; just take a look or google (DDL Triggers in SQL Server 2005) on web to know more about them.</p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bhadri</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-57612</link>
		<dc:creator><![CDATA[bhadri]]></dc:creator>
		<pubDate>Sat, 14 Nov 2009 11:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-57612</guid>
		<description><![CDATA[You Explained disadvantages of Triggers. Could you explain advantages of triggers?]]></description>
		<content:encoded><![CDATA[<p>You Explained disadvantages of Triggers. Could you explain advantages of triggers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yogesh</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-56842</link>
		<dc:creator><![CDATA[yogesh]]></dc:creator>
		<pubDate>Wed, 21 Oct 2009 09:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-56842</guid>
		<description><![CDATA[deep knowledge about sql and t sql]]></description>
		<content:encoded><![CDATA[<p>deep knowledge about sql and t sql</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vel</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-56716</link>
		<dc:creator><![CDATA[Vel]]></dc:creator>
		<pubDate>Thu, 15 Oct 2009 06:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-56716</guid>
		<description><![CDATA[I have create trigger for when I update tbl_personal table at the same time entry will be done in tbl_general table.

CREATE TRIGGER trig_personals
ON tbl_personal
FOR UPDATE 
AS
DECLARE @Flag VARCHAR(100) 
DECLARE @Reg numeric(9)
IF NOT UPDATE(Flag)
BEGIN
Update tbl_general set Flag=&#039;A&#039; where Reg=@Reg
END

Can u help Me.
It&#039;s very urgent
Thanks in Advance]]></description>
		<content:encoded><![CDATA[<p>I have create trigger for when I update tbl_personal table at the same time entry will be done in tbl_general table.</p>
<p>CREATE TRIGGER trig_personals<br />
ON tbl_personal<br />
FOR UPDATE<br />
AS<br />
DECLARE @Flag VARCHAR(100)<br />
DECLARE @Reg numeric(9)<br />
IF NOT UPDATE(Flag)<br />
BEGIN<br />
Update tbl_general set Flag=&#8217;A&#8217; where Reg=@Reg<br />
END</p>
<p>Can u help Me.<br />
It&#8217;s very urgent<br />
Thanks in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-55969</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Fri, 18 Sep 2009 09:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/24/sql-server-disadvantages-problems-of-triggers/#comment-55969</guid>
		<description><![CDATA[@Vidit

There are two kind of Triggers in SQL Server 2005 and Higher...
1. DML - Data Manipulation Language - INSERT, UPDATE, DELETE
2. DDL - Data Definition Language - CREATE, ALTER, DROP.... many more...

In SQL Server 2000 and lower, we had only one type of trigger, DML Triggers. 

Look at these links 

For DML Triggers :
http://www.sql-server-performance.com/articles/dev/triggers_2000_p1.aspx

For DDL Triggers :
http://www.sql-server-performance.com/articles/audit/ddl_triggers_p1.aspx

Google on key word : DDL Triggers in SQL Server or DML Triggers in SQL Server, you will get plenty of useful links to visit. 

Take time to understand the logic, rather than remembering the syntax. 

~ IM.]]></description>
		<content:encoded><![CDATA[<p>@Vidit</p>
<p>There are two kind of Triggers in SQL Server 2005 and Higher&#8230;<br />
1. DML &#8211; Data Manipulation Language &#8211; INSERT, UPDATE, DELETE<br />
2. DDL &#8211; Data Definition Language &#8211; CREATE, ALTER, DROP&#8230;. many more&#8230;</p>
<p>In SQL Server 2000 and lower, we had only one type of trigger, DML Triggers. </p>
<p>Look at these links </p>
<p>For DML Triggers :<br />
<a href="http://www.sql-server-performance.com/articles/dev/triggers_2000_p1.aspx" rel="nofollow">http://www.sql-server-performance.com/articles/dev/triggers_2000_p1.aspx</a></p>
<p>For DDL Triggers :<br />
<a href="http://www.sql-server-performance.com/articles/audit/ddl_triggers_p1.aspx" rel="nofollow">http://www.sql-server-performance.com/articles/audit/ddl_triggers_p1.aspx</a></p>
<p>Google on key word : DDL Triggers in SQL Server or DML Triggers in SQL Server, you will get plenty of useful links to visit. </p>
<p>Take time to understand the logic, rather than remembering the syntax. </p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

