Re: Web Service from aspx

From: Sami Vaaraniemi (samivawantsnospam_at_jippii.fi)
Date: 02/27/04


Date: Fri, 27 Feb 2004 02:01:39 -0700


"RR" <anonymous@discussions.microsoft.com> wrote in message
news:E382049A-4197-43D6-8AE1-9F7AB7870ED3@microsoft.com...
> Hi,
> is it possible to call a web service from inside SQL Server in any way? If
yes, how?
>
> Basically I am trying to fire a insert trigger, which will select some
data from a table and instantiate .Net dll and populate its properties with
the table data. I know there are other ways to do it but i would like to
know if there is a way to achieve the above as well.
>
> Any help would be appreciated.

There was a similar question in the C# newsgroup just recently (search for
"c# and ms sql triggers").

In theory, you could e.g., write a C# class that calls the web service and
expose it as a COM component. You could then call the COM component from the
SQL trigger.

However I do not think this is a realistic approach for any serious use. For
starters, calling a COM component from a trigger is relatively slow already,
and the inevitable overhead of the web service call would make this approach
impractical. You want your trigger to execute as quickly as possible to
avoid bogging down the database.

Not knowing your exact requirements its hard to say, but one way of doing
this would be to write an extended stored procedure in unmanaged C++ and
call it from the trigger. This extended stored procedure would just place a
message in an MSMQ queue. Another application would then read the message
from the queue and call the web service. This way the trigger would be
decoupled from the web service call.

Sami
www.capehill.net



Relevant Pages

  • RE: calling a web service from SQL Server
    ... the trigger calls the stored procedure correctly. ... helloworld.vb), however when I add a web reference to the web service, the ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.dts)
  • Trigger Timeout Loop Issue
    ... In our database code, we have an AFTER trigger on a specific ... since the record is locked by the trigger, the stored procedure ... processing will the stored procedure (and thus the web service) ...
    (comp.databases.oracle.server)
  • Re: Synchronization between DB server and client. Possible?
    ... Call the web service asynchronously (i.e. in its ... extended stored procedure that can be called from a trigger. ... Web service signals waiting thread in your client app. ... > "The client application notified from server about any changes on DB ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Couple of questions about orchestrations
    ... To trigger an orchestration you must send a message. ... You can call a web service with no input. ... you will get a message type for the input message ...
    (microsoft.public.biztalk.general)
  • Re: Update trigger
    ... nvltrigger for each column for example. ... SQL> drop trigger emp_upd_trig ... SQL> create table emp ( ... Commit complete. ...
    (comp.databases.oracle.server)

Loading