Re: sql server events on data create

From: Peter Yeoh (nospam_at_nospam.com)
Date: 06/18/04


Date: Fri, 18 Jun 2004 17:47:55 +0800

If I were to do this, I would set up the client to listen on a socket, write
an extended stored procedure that can trigger this socket, and write
triggers on the tables of interest to call this extended stored procedure,
though it might be a bit messy if you want to monitor all the tables.

Or you could start a custom SQL Server trace event with the right filters?
I haven't done this before, though.

Or if you don't mind changing backends, the Firebird/Interbase database has
events just for this purpose. The client registers named events they are
interested in, triggers/stored procedures can raise these events, and the
database will 'call' all clients which registered for those events. Very
neat. And I believe they have a .NET adapter, though I don't know if it
supports events.

Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup

"Björn" <prodevelop@gmx.net> wrote in message
news:uIsNWZRVEHA.3264@TK2MSFTNGP10.phx.gbl...
> Hi list
>
> I´m searching for a way to tell a c# program when data is created in sql
> server.
> I knew of the ability to let my program poll the sql server but I´m
> searching for a solution
> which works in the other direction.
>
> A little bit like exchange and outlook. The exchange server tells outlook
> when a new email is arrived.
> And I want to let the sql server tell the c# program that new data
arrived.
>
> Can you give me some catchwords so I can google for my problem.
>
> regards
>
> Björn
>
>



Relevant Pages

  • Re: Stored procedure/trigger and scripts
    ... must have been the trigger that locked up the table. ... SQL Server has permissions to execute xp_cmdshell. ... >> client to change their password they have to call the "Client Relations" ...
    (microsoft.public.sqlserver.programming)
  • Re: Stored procedure/trigger and scripts
    ... I just ran some additional tests and it looks like my trigger is fine. ... SQL Server has permissions to execute xp_cmdshell. ... >> client to change their password they have to call the "Client Relations" ...
    (microsoft.public.sqlserver.programming)
  • Re: call to xp_cmdshell from trigger problem
    ... The application user is a SQL Server account and not a Windows user account. ... try a test and see if the client gets the required info. ... >> database and causes a trigger to fire and starts a process to notify the ...
    (microsoft.public.sqlserver.server)
  • Re: IIS ODBC logging with extended stored procedure on a trigger
    ... The extended stored procedure doesn't seem to be executed. ... If I call it from outside the trigger, with the exact same arguments it ... > Wayne Snyder, MCDBA, SQL Server MVP ... >> execution, and nothing is inserted to my table. ...
    (microsoft.public.sqlserver.server)
  • Re: IIS ODBC logging with extended stored procedure on a trigger
    ... fatal error, and it was reflected only inside the trigger... ... > The extended stored procedure doesn't seem to be executed. ... >> community of SQL Server professionals. ...
    (microsoft.public.sqlserver.server)