Skip to Content.
Sympa Menu

freetds - Re: [freetds] Freetds API query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Freetds API query
  • Date: Wed, 11 Jun 2003 08:08:19 -0400

On 10 Jun 2003 23:47:55 +0100, Chris Underhill <chris AT tart.net> wrote:
> > Did you use sockets to send messages the from the C stored procedures
> > ?
>
> Yes - standard winsock calls. Look in the sql server documentation/msdn
> for details on how you can create an "extended stored procedure" and
> then look up using google etc. for info on creating simple winsock
> applications and put the two together as detailed in the documentation
> to generate a dll.
>
> Finally you need a nice friendly sysadmin who trusts your code enough
> that s/he's happy to load this dll into the server's address space and
> create the procedure using sp_addextendedproc - afair if your code is
> buggy/leaky, this can create rather a lot of fun with sql server
> hangs/crashes etc. :-)

I might add that you should be *very* nice to such sysadmin, for s/he is
both rare and brave. As Chris says, your DLL is attached to SQL Server's
process; if it crashes, it takes the server down with it. You are also
undertaking some political liability, because the next time the server
behaves unexpectedly, you can bet questions will be routed in your
direction, even if your code is perfect.

I'm not advising against; I think Chris's technique is clean and
efficient. I'm just offering a friendly "caveat programmer" that your
extended stored procedure can have unintended technical and political side
effects.

[returning to topic...]

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page