cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC channel polling duplicate records multiple times

Former Member
0 Kudos

Hi Experts,

My issue is JDBC sender channel polling duplicate records multiple time. In my case it pollled same data 16 time.

Channel settings are as follows:

poll interval : 3600 sec

Availability time:Daily: At 5:00:00 AM For 55 Minutes

I m not getting the exact root cause of this.

please advise and wht can be the possible solution.

thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

agasthuri_doss
Active Contributor
0 Kudos

Hey,

In Sender JDBC Channel check whether the Update Query is right.

Cheers

Agasthuri

Former Member
0 Kudos

Hi,

there is no update query.

<TEST> is used there.

agasthuri_doss
Active Contributor
0 Kudos

Hey,

In Query try like this - select * from TABLE where status = 'U' and rownum < 100

In Update statement try like this - update TABLE set status = 'P' where rownum < 100 and status = 'U'

Let us know whether - polling duplicate records multiple times happens again ?

Cheers

Agasthuri

Former Member
0 Kudos

Hi Mohan,

How are you making surelike the comm. channel is not picking the data twice or more, because you dont have a update statement?

Regards.

---Satish

Former Member
0 Kudos

thanks for the response..

so there is only need to write UPDATE query in JDBC channel. nothing else rt

please confirm

and wht this query will do?

please clarify.

thanks a lot in adcance.

Former Member
0 Kudos

Hi satish,

there are 16 same messages in SXMB_MONI with diffrent messages ID.

agasthuri_doss
Active Contributor
0 Kudos

Hey,

Query will read the records from the table & Update query will update the table were the records are read by the adapter ,so that it will not read it again & again.

Go thru this

http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm

Cheers

Agasthuri

Former Member
0 Kudos

Hi Agasthuri,

my query is written like this

SELECT distinct event_id FROM table where rownum < 200

Now just have to write the Update query like this as u suggested

update TABLE set status = 'P' where rownum < 100 and status = 'U'

will it resolve my issue now?

Please specify 'P' and 'U' here.

thanks in advnace.

agasthuri_doss
Active Contributor
0 Kudos

Hey,

>SELECT distinct event_id FROM table where rownum < 200

Mention the Status Column

>Now just have to write the Update query like this as u suggested

>update TABLE set status = 'P' where rownum < 100 and status = 'U'

Good

>will it resolve my issue now?

Yes, After changing the Query Statement ( That is add Statua Column )

>Please specify 'P' and 'U' here.

P - to mention that those records are Processed by the adapter in the sense it is passed to PI & Adapter will not read it again.

U - Not yet read by the adapter ( If the status is maintained in the table as U the Adapter will read )

Just go thru this Link..I mentioned in the earlier post ,

Cheers

Agasthuri

Former Member
0 Kudos

This will not resolve your problem,

you need to use the where clause in your select statement on the same field which you are using in update query.

your select should be like this- SELECT distinct event_id FROM table where rownum < 200 and status = 'U'

Former Member
0 Kudos

Hi,

here 'P' and 'U' should be there in table, otherwise the select query and update query will not work.

I believe 'P' and 'U' column are not there in table.

please advise further.