CLR Triggers for SQL Server 2005
page 1 of 9
Published: 18 May 2007
Abstract
In this article Soyuj describes different type of triggers, more specially CLR triggers, and their uses. It covers examples for creating T-SQL as well as CLR Triggers.
by Soyuj Kumar Sahoo
Feedback
Average Rating: 
Views (Total / Last 10 Days): 27532/ 665

Introduction

As I discussed in my previous articles, now Microsoft SQL Server 2005 is integrated with Microsoft .NET Framework Common Language Runtime (CLR), so we can use any .NET Framework language to create database objects. The CLR provides the execution environment for all the server side objects that are created using a .NET language. This means the database developers can now perform tasks that were impossible or difficult to achieve with T-SQL alone. Especially when working with large amounts of server code, developers can easily organize and maintain their code investments.

This article covers different types of triggers supported by Microsoft SQL Server 2005 with basic ideas about them with an example. It then describes the step-by-step approach to create a CLR trigger (a DML type).


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 7 and 3 and type the answer here:

User Comments

Title: TRIGGERS   
Name: JONTY
Date: 11/14/2008 5:18:21 AM
Comment:
nice article
Title: trigger   
Name: suvendu
Date: 11/6/2008 10:04:09 AM
Comment:
average
Title: trigger   
Name: sankata
Date: 11/6/2008 9:51:26 AM
Comment:
very good
Title: trigger   
Name: Nimit
Date: 11/3/2008 4:26:33 AM
Comment:
good
Title: trigger   
Name: Harsh
Date: 11/3/2008 4:25:51 AM
Comment:
nice but need some more example for ddl,dml trigger
Title: triggers   
Name: kaushik
Date: 10/28/2008 3:33:23 AM
Comment:
good but can be made better by giving more examples.
Title: triggers   
Name: bangaram
Date: 10/15/2008 6:16:17 AM
Comment:
good but need more examples
Title: triggers   
Name: solai
Date: 10/9/2008 2:08:31 AM
Comment:
nice solutions!!!!!!!!!!!
thanks
Title: Triggers   
Name: Vivek
Date: 9/24/2008 11:49:36 PM
Comment:
Nice article!!

Need more info on DDL triggers

Thanks
Title: cheta   
Name: Pandu
Date: 9/5/2008 1:34:13 AM
Comment:
Required info is not found
Title: good article   
Name: Digisha Modi
Date: 8/18/2008 12:35:26 AM
Comment:
This is very good article for a guy who is new for CLR Trigger. From this article they can get the basic idea how to develop a CLRTriggers.

Good & Thanks,
Digisha Modi.
Title: Simply Superb   
Name: Ashis Kumar Das
Date: 8/6/2008 7:25:18 AM
Comment:
I am very grateful to you for putting such a good information about triggers. I have understood what exactly a trigger means and i will try to implement it on our project.Thanks again...
Title: Simply Superb   
Name: Dsr
Date: 7/22/2008 8:07:46 AM
Comment:
Hello!! Hi,
This tutorial is very good. Post examples for Insert , Update and Delete.

Thank you very much
Title: Excellent   
Name: A R Soares
Date: 6/27/2008 11:21:02 AM
Comment:
Congratulations for the clarity with which managed to convey information which I always thought to be complex so that I could understand.
Title: Amazing   
Name: Shahejad Shaikh
Date: 6/24/2008 10:02:26 AM
Comment:
Its really very helpful.Give very much details about triggers in Sqlserver 2005.
Title: Very Helpful   
Name: Priya
Date: 6/24/2008 2:18:53 AM
Comment:
Really it helped a lot to know about triggers and CLR Triggers. Thanks a lot dude.
Title: Very Good   
Name: MadhusudhanReddy
Date: 6/17/2008 12:46:55 AM
Comment:
Hello,very nice. but give to the one r two examples.
Title: Trigger   
Name: Ravi
Date: 6/2/2008 1:38:27 AM
Comment:
Thank you. Good Article
Title: triggers   
Name: indian
Date: 5/10/2008 12:29:48 AM
Comment:
good
Title: insert,update,delete triggers in 2000   
Name: singh
Date: 4/29/2008 4:08:59 AM
Comment:
will u plz explain all these three triggers in brief.
u have just given an overview here
Title: Need in c#   
Name: Prakash
Date: 4/8/2008 10:49:19 AM
Comment:
will u please Explain in C#? prakash_naanuvar@yahoo.co.in
Title: pls explain this in C#   
Name: geetha
Date: 3/18/2008 2:49:57 AM
Comment:
hello sir/madam
tutorial is good and i satisfied but explain this clr and ddl triggers in C#
Title: very nice...   
Name: private
Date: 3/11/2008 12:55:25 AM
Comment:
Thank u....
Title: good   
Name: prof
Date: 3/2/2008 3:40:37 PM
Comment:
Good information
thanks
Title: excellent!!   
Name: Bindu
Date: 2/10/2008 8:52:07 AM
Comment:
Thankyou very much
Title: Plz help me with this doubt!!!   
Name: Vishwas Setty
Date: 11/18/2007 3:38:59 PM
Comment:
Hi there,

can we use this triggers in updating table values...ex: if i update a value in one table, it should reflect the same in another table??? Plz let me know how we can do this???
Title: Great Knowledge   
Name: Vishwas Setty
Date: 11/18/2007 3:30:39 PM
Comment:
Hi there,

I am very grateful to you for putting such a good information about triggers and i am happy to say that, i have understood what exactly a trigger means and i ll try to implement it on our project.Thanks again...
Vishwas
Title: Nice to learn abt Trigger   
Name: sandeep
Date: 9/29/2007 5:10:10 AM
Comment:
This is very good article to know that what is the relationship between stored procedure and Trigger.
Title: Good Article   
Name: Kesar
Date: 9/28/2007 12:47:18 PM
Comment:
Very good article..good effort.
Good luck
Title: Info   
Name: Amit
Date: 9/21/2007 8:09:54 AM
Comment:
Hi, Can we do this by using tables in different databases.
I mean i want to insert some data in TableA(in DatabaseA), On INSERT in TableB(in DatabaseB).
Please send a mail to me regarding the same on amit.sharma.rs@logicacmg.com

Thank You
Regards
Amit
Title: Good Article   
Name: vivek sisodia
Date: 7/23/2007 3:23:43 AM
Comment:
I think this is good article to know about trigger .
Title: Easy to do   
Name: Zé Luis
Date: 7/19/2007 10:50:14 AM
Comment:
Thankyou;
Title: Clear and precise article   
Name: Kartik Subramaniam
Date: 7/17/2007 1:06:51 AM
Comment:
Article is really good with decent comparison between the previous versions and the latest one.
Title: Good Article   
Name: DON
Date: 6/15/2007 2:34:52 AM
Comment:
Good Article
Title: CLR Triggers   
Name: Uday
Date: 5/20/2007 11:33:08 AM
Comment:
Simple but clearly illustrates all the types of triggers. Good job dude. Thanks a ton.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 11/22/2008 5:39:41 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search