If you absolutely must call a WCF service from inside your database, here’s how you do it…

When I was an operations DBA, this would probably fall into the category of “just because you can do something, doesn’t mean that you should”:

Call a WCF Service from SQLCLR (by Niels Berglund)

However, there are probably a couple of good scenarios where I might advocate for doing just this in future projects, especially if the customers have experienced DBAs and don’t have an existing middle tier admin group. (They exist. I consulted for a couple.)

I’m encouraging Niels to formalize this a bit and put in CodePlex or Code Gallery.

Cool stuff!

Comments (3)

  1. Steve W says:

    Typically, this would happen because you want data from the web service, right?  Might be better to use a WCF web service component in SSIS.  The whole unsafe clr proc…not so much fun.

  2. reedme says:

    Steve, what fun would that be? Besides, the last time I remember talking about WCF and SSIS with you, well, you were completely opposed to that, too! Heh.

Skip to main content