[freetds] Freetds API query
chris at tart.net
Tue Jun 10 18:47:57 EDT 2003
On Tue, 2003-06-10 at 22:31, manoranjan_sahu at agilent.com wrote:
> That's very similar to what I have been looking for.
> Would it be possible for you to be a little more detailed ?
> My world has been mostly unix. My apologies if these questions are
> too trivial.
I too come from Unix background and this is the only winsock programming
I've ever done ;-) Fortunately it's very similar to the standard unix
> 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. :-)
> How do you send messages from SQL server to unix boxes using database
> triggers. Does SQL server has any feature like that ? I couldn't find any..
Just have the trigger call the extended stored procedure, which will
send the message to the address that your unix servers are listening on.
More information about the FreeTDS