[freetds] Freetds API query

manoranjan_sahu at agilent.com manoranjan_sahu at agilent.com
Tue Jun 10 18:58:37 EDT 2003


Appreciate it Chris, 

That was very helpful.

-----Original Message-----
From: Chris Underhill [mailto:chris at tart.net]
Sent: Tuesday, June 10, 2003 3:48 PM
To: FreeTDS Development Group
Subject: RE: [freetds] Freetds API query


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 ? 

Sure.

> 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
socket api.

> 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.

HTH,


Chris.

_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



More information about the FreeTDS mailing list