[freetds] How to subscribe Microsoft Sql server

Frediano Ziglio freddy77 at gmail.com
Wed Aug 31 04:39:43 EDT 2016


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
http://www.easysoft.com/support/kb/kb01069.html.
The other option is triggers, see
https://msdn.microsoft.com/en-us/library/ms189799.aspx.

Frediano


More information about the FreeTDS mailing list