[freetds] How to subscribe Microsoft Sql server

Xiaobiao Yin xiaobiaoyin at outlook.com
Wed Aug 31 06:22:23 EDT 2016

Hi Frediano

    Thank your for timely reply.

    For query notifications, it depends a SQL Server ODBC driver<http://www.easysoft.com/products/data_access/odbc-sql-server-driver/index.html> which is not free.

    For trigger, I need to implement a program in windows to subscribe the notification

and then transform this information to Linux. This might be a backup method.

    Is there a way to use open source to implement this requirement?


From: FreeTDS <freetds-bounces at lists.ibiblio.org> on behalf of Frediano Ziglio <freddy77 at gmail.com>
Sent: Wednesday, August 31, 2016 4:39 PM
To: FreeTDS Development Group
Subject: Re: [freetds] How to subscribe Microsoft Sql server

2016-08-30 23:15 GMT+01:00 Xiaobiao Yin <xiaobiaoyin at outlook.com>:
> Hi Experts
>      I am very new to FreeTDS and SQL server.
>      so far I can connect the MS SQL server 2005 from CentOS 7.2 using C program.
>      My requirement is that if the SQL database changed (such as insert ,delete or update some items),
>      is there a way to know this change?
>      After looking through the APIs, I found there is no such APIs to subscribe specified SQL database table.
>      Generally, I need to polling this specified table and see if the return results is the same as the last query, but it
> seems a little bit complex and no efficiency.
>      So my question is:
> Is there an API to subscribe specified table in SQL server database.
>      Any comment and hint is welcome.
>      Thanks in advance.
> Eric

One option is query notifications, for instance see
How do I use SQL Server Query Notifications from Linux and ...<http://www.easysoft.com/support/kb/kb01069.html>
Query notifications, introduced in SQL Server 2005, allow an application to request a notification from SQL Server when the results of query change.

The other option is triggers, see

FreeTDS mailing list
FreeTDS at lists.ibiblio.org

More information about the FreeTDS mailing list