Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client-Server database application: how to notify clients that data was changed?

Is it possible to know when and if the contents of certain tables in a database has changed? How can my SQL Server notify the client applications that the data was changed by another user? How to implement query notifications with dbGo ?

Do my clients need to poll the database, or is there a callback mechanism for this?

My client is a Delphi application with TADODataSet, and my server is SQL Server 2005/2008, serving multiple clients.

like image 927
ZigiZ Avatar asked May 17 '12 14:05

ZigiZ


People also ask

What is database change notification?

Database Change Notification is a feature that enables client applications to register queries with the database and receive notifications in response to DML or DDL changes on the objects associated with the queries. The notifications are published by the database when the DML or DDL transaction commits.

How can I get notification from database when any transaction is on records?

There are two simple methods within the NotificationsHub class, one to push the newly edited database table data to the clients (all the connected clients in this case), and a method to retrieve cached data when a device connects for the first time (performance gain).

How do clients interact with database servers?

The server returns each requested page (and possibly others) to the client. The client is responsible for mapping between objects and pages. In an object server system, the client requests specific objects from the server; the server is responsible for mapping between objects and pages.

Which of the following packages will you use when you want an application to be notified whenever the value of interest in database are changed?

Which of the following packages will you use when you want an application to be notified whenever the values of interest in the database are changed? Explanation/Reference: The DBMS_HPROF package provides an interface for profiling the execution of PL/SQL applications.


1 Answers

The Delphi dbGo controls does not support Query Notifications, so either poll the database or try to check e.g. some of the following:

  • WMI Provider for Server Events - MSSQL Service Broker
  • DA-SOFT AnyDAC TADEventAlerter component - Query Notifications mechanism
  • Devart SDAC TMSChangeNotification component - Query Notifications mechanism
like image 124
TLama Avatar answered Oct 05 '22 23:10

TLama