OraAlerter Event doesnt work 100% reliable

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Peter12345
Posts: 3
Joined: Tue 18 Jul 2017 09:23

OraAlerter Event doesnt work 100% reliable

Post by Peter12345 » Tue 18 Jul 2017 09:34

I have created an Trigger DBMS_ALERT (before Insert) which is connected with my OraAlerter.

Sometimes the OraAlerter misses one event (About 1 of 1000).

How to fix this?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: OraAlerter Event doesnt work 100% reliable

Post by MaximG » Tue 18 Jul 2017 12:45

Thank you for your request. Unfortunately, the information you provided is not enough to investigate the reasons for this behavior. Please provide more details on this issue. If possible, compose up and send us a small example, in which the issue occurs via the e-support form ( https://www.devart.com menu "Support"\"Request Support" )

Peter12345
Posts: 3
Joined: Tue 18 Jul 2017 09:23

Re: OraAlerter Event doesnt work 100% reliable

Post by Peter12345 » Tue 18 Jul 2017 13:54

I have created a Trigger in my SQL Database:

Code: Select all

create or replace TRIGGER ALERT_TEST_BI 
BEFORE INSERT ON ALERT_TEST 
BEGIN

  dbms_alert.SIGNAL('TESTEVENT', 'Hallo'); 
 
  NULL;
END;
I have used the control OraAlerter with the Event "TESTEVENT" in my application.


OnEvent:

Code: Select all

void __fastcall TForm5::OraAlerter4Event(TObject *Sender, UnicodeString Event, UnicodeString Message)

{
	Edit6->Text = Edit6->Text.ToInt() + 1;
}
Every new insert should trigger the Event and my Edit counter increases bye one.

I have realized that the OraAlerter Event isnt called every time. Sometimes the event misses the reaction to the Trigger event (About 1 of 1000, random).

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: OraAlerter Event doesnt work 100% reliable

Post by MaximG » Thu 20 Jul 2017 08:57

We started investigating the behavior you described. However, we could not reproduce the issue yet. Would you please specify what values Alerter.Interval and Alerter.Timeout have in your project?

Peter12345
Posts: 3
Joined: Tue 18 Jul 2017 09:23

Re: OraAlerter Event doesnt work 100% reliable

Post by Peter12345 » Thu 20 Jul 2017 11:50

Thank you for your answer,

I dont use the Timeout function.

I have made a Desktop Video. I havent found any upload function in this forum so I uploaded it to a Filehosting Service.

http://www54.zippyshare.com/v/BUuUI2WE/file.html

I am using a Timer which do some Inserts on my SQL Database. A new insert triggers the event which is connected with my alerter.

In my Application Im using 3 Edit fields: The number of inserts, the number of received alert events and a field which displays the calculated difference between the inserts and received alert events.

As you can see in the video, 1 Event is lost.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: OraAlerter Event doesnt work 100% reliable

Post by MaximG » Fri 11 Aug 2017 13:51

Thank you for the provided information. All this time we have been trying to identify the source of the issue. However, we could not manage to repeat the test you provided on the video.
Of course, we were able to simulate the situation when not all messages generated in the body of the trigger were got on the receiving side. But this behavior is correct when using
DBMS_ALERT in the case when the message delivery time is longer than the waiting timeout on the receiving side. By increasing the timeout, we could reach a situation when absolutely all signals were successfully received. Please specify if this issue is reproduced in all the cases. Is it possible to repeat this error with fewer iterations?
Have you tried to change the Alerter.Timeout parameter?

Post Reply