473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

notify/listen?

Hi there,

can somebody tell me if there is a mechanism in db2 which implements
a notify/listen for external db clients?
Postgres has such a mechanism where a client programm can connect to
the db and send a "listen <name>" sql command and then gets a message
if someone in the system issued a "notify <name>".
This way the client does not need to poll the database if it wants
to be uptodate to the current table status.

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
Jul 9 '08 #1
4 2373
Ian
Christian Welzel wrote:
Hi there,

can somebody tell me if there is a mechanism in db2 which implements
a notify/listen for external db clients?
Postgres has such a mechanism where a client programm can connect to
the db and send a "listen <name>" sql command and then gets a message
if someone in the system issued a "notify <name>".
This way the client does not need to poll the database if it wants
to be uptodate to the current table status.
There is no built-in way to do this with DB2.


Jul 9 '08 #2
Ian wrote:
There is no built-in way to do this with DB2.
Is there some other mechanism to get a notification delivered
to an external client on table inserts/updates (except polling)?

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
Jul 9 '08 #3
Ian
Christian Welzel wrote:
Ian wrote:
>There is no built-in way to do this with DB2.

Is there some other mechanism to get a notification delivered
to an external client on table inserts/updates (except polling)?
Nothing that's built in to the engine. But you could probably use
MQ series (or whatever it's called now) or your own custom functions
to do something like this.

Jul 10 '08 #4
Ian wrote:
Nothing that's built in to the engine. But you could probably use
MQ series (or whatever it's called now) or your own custom functions
to do something like this.
I solved it now with my own udf. i wrote a 10 line c program, that
simply opens a named pipe and writes something into it. The client
now only has to do some blocking read on the pipe and all goes fine.

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
Jul 10 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alessandro GARDICH | last post by:
Hi to all I have problem with NOTIFY/LISTEN ... I'm writing a C++ application with libpqxx, I thought was a problem of the lib but I try also with a C program using libpq with the same result,...
4
by: Joe Lester | last post by:
I'm using PostgreSQL 7.4.1. I have 140 clients connected on average using libpq. When one client sends "NOTIFY timeclock;" to the server all 140 clients are listening for it. After receiving a...
4
by: Glenn Sullivan | last post by:
Hi, I have been trying to get LISTEN/NOTIFY working in with JDBC. I cannot seem to get notified. I looked in the e-mail archive and saw a lot of similiar questions a couple of years ago. I...
3
by: Frank van Vugt | last post by:
L.S. Either the docs or I are missing something.... While using libpq I noticed that listen/notify calls were being converted to lowercase. A further look showed that the listen/notify calls...
5
by: Ted Shab | last post by:
Hi, I'm trying to come up with a relatively simple multi-master replication solution. This is for multiple databases that need to be discreet, and change relatively infrequently (10-30 updates...
3
by: Mark Denardo | last post by:
Does anyone have any good VB.NET example code that shows how to use the NOTIFY option using the mciSendString API and then handle the return value. The only examples I can find show the VB way...
0
by: Z. Kotzer | last post by:
I can not get error notifications when an asynchat based client tries to connect to a non-responsive address. To validate the problem I changed lib/test/test_asynchat.py as follows: class...
1
by: namrataa | last post by:
i have a notify icon for our media player developed in wpf. included files are notify.cs,notify.resx,notify.designer.cs. i have also added a class file called app.cs . now the problem is how...
5
by: Peter | last post by:
I have a webpage which creates reports, a report can take few seconds or several minutes to create. This webpage calls a web service which in turn does a remoting call to a windows service and the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.