Home All Groups Group Topic Archive Search About
Author
3 Mar 2006 7:47 AM
Basic
Is it posible to fire an event in sql 2005 DB when e.g. one record changes in
the table and...main part ... respond to that event in some external c#
service?

Author
3 Mar 2006 7:51 AM
oj
Take a look at 'create trigger' in help.

--
-oj



Show quote
"Basic" <Ba***@discussions.microsoft.com> wrote in message
news:D979C99C-8CBE-46A4-BA8F-A2E2967B0092@microsoft.com...
> Is it posible to fire an event in sql 2005 DB when e.g. one record changes
> in
> the table and...main part ... respond to that event in some external c#
> service?
Author
3 Mar 2006 10:38 AM
Niels Berglund
=?Utf-8?B?QmFzaWM=?= <Ba***@discussions.microsoft.com> wrote in
news:D979C99C-8CBE-46A4-BA8F-A2E2967B0092@microsoft.com:

> Is it posible to fire an event in sql 2005 DB when e.g. one record
> changes in the table and...main part ... respond to that event in some
> external c# service?
>

You do not have an automatic way of raising events to external resources
from inside SQL Server. There are however a couple of things you can do
to make this happen:

1. Have a trigger who talks tom a CLR proc, in the clr proc you
initiates an external app.
2. Use SQL Server Servie Broker. The SSB team has created a sample how
to activate an external resource based on a message appearing in a
queue.

Niels

--
**************************************************
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
**************************************************
Author
3 Mar 2006 11:56 AM
Basic
thx niels, this was constructive... one more thing, where can I find this
example (have you link) pls

Show quote
"Niels Berglund" wrote:

> =?Utf-8?B?QmFzaWM=?= <Ba***@discussions.microsoft.com> wrote in
> news:D979C99C-8CBE-46A4-BA8F-A2E2967B0092@microsoft.com:
>
> > Is it posible to fire an event in sql 2005 DB when e.g. one record
> > changes in the table and...main part ... respond to that event in some
> > external c# service?
> >
>
> You do not have an automatic way of raising events to external resources
> from inside SQL Server. There are however a couple of things you can do
> to make this happen:
>
> 1. Have a trigger who talks tom a CLR proc, in the clr proc you
> initiates an external app.
> 2. Use SQL Server Servie Broker. The SSB team has created a sample how
> to activate an external resource based on a message appearing in a
> queue.
>
> Niels
>
> --
> **************************************************
> * Niels Berglund
> * http://staff.develop.com/nielsb
> * nielsb@no-spam.develop.com
> * "A First Look at SQL Server 2005 for Developers"
> * http://www.awprofessional.com/title/0321180593
> **************************************************
>
Author
3 Mar 2006 12:45 PM
Niels Berglund
=?Utf-8?B?QmFzaWM=?= <Ba***@discussions.microsoft.com> wrote in
news:19EE2685-6BDE-4149-8EB8-D8AAAD2EF59E@microsoft.com:

> thx niels, this was constructive... one more thing, where can I find
> this example (have you link) pls
>
>

Go to here: http://www.gotdotnet.com/codegallery/codegallery.aspx?id=
9f7ae2af-31aa-44dd-9ee8-6b6b6d3d6319 (watch out for linebreaks).

You should find it there.

Niels

--
**************************************************
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
**************************************************

AddThis Social Bookmark Button