[ZBX-2031] Dublicate rows in dservices with Oracle DB Created: 2010 Feb 17  Updated: 2017 May 30  Resolved: 2010 Jun 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 1.8.1, 1.9.0 (alpha)
Fix Version/s: 1.8.3, 1.9.0 (alpha)

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File dservices.diff    

 Description   

if key_ in dservices null and zabbix_server trying search in DB row with discvered service, it execute SQL:
select dserviceid,dhostid,status,lastup,lastdown,value from dservices where dcheckid=48 and type=12 and key_='' and ip='10.100.187.198' and port=0;

but for Oracle key_='' not key_=null

for Oracle need query:
select dserviceid,dhostid,status,lastup,lastdown,value from dservices where dcheckid=48 and type=12 and key_ is null and ip='10.100.187.198' and port=0;

I think in sources still encountered similar problems.



 Comments   
Comment by Alexey Pustovalov [ 2010 Mar 05 ]

temporary solution in patch

Comment by Benjamin Coles [ 2010 Mar 11 ]

use this to clean up the table:

delete from dservices
where rowid not in
( select max(rowid) from dservices group by TYPE,key_,ip,dcheckid)

Comment by Benjamin Coles [ 2010 May 29 ]

this patch works, I've tested this in our dev and prod environment. I'd vote to have this added to trunk.

Comment by Aleksandrs Saveljevs [ 2010 Jun 02 ]

Fixed in pre-1.8.3 in r12459.

Generated at Thu Mar 28 23:51:10 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.