-
Incident report
-
Resolution: Duplicate
-
Trivial
-
None
-
5.0.14, 5.0.15, 5.4.4
-
None
Hello,
there is a problem in the Zabbix server for oracle according the usage of the NCLOB columns.
Zabbix server tries to get data from the alerts table using the DISTINCT keyword including a NCLOB column.
See the following statement, the message column is defined as NCLOB:
select distinct userid,mediatypeid,subject,message,esc_step from alerts where actionid=28 and mediatypeid is not null and alerttype=0 and acknowledgeid is null and eventid=71910340 order by userid,mediatypeid,esc_step desc
Resulting Error:
ORA-00932: inconsistent datatypes: expected - got NCLOB [select distinct userid,mediatypeid,subject,message,esc_step from alerts where actionid=28 and mediatypeid is not null and alerttype=0 and acknowledgeid is null and eventid=71910340 order by userid,mediatypeid,esc_step desc]
It does not matter if the query returns data. Also the following statement will fail:
select distinct userid,mediatypeid,subject,message,esc_step from alerts
In both cases you will get the ORA-00932 error because it is not supported by Oracle to use the DISTINCT keyword on a NCLOB column.
To fix this problem the NCLOB column must be converted in the statement.
The best way for that would be to use the dbms_lob.substr() function for that, because it can convert text values with more than 4000 characters.
The following statement will succeed without the ORA-00932 error:
SELECT DISTINCT userid,mediatypeid,subject,dbms_lob.substr(message, 65535, 1) ,esc_step
from alerts
So the Zabbix server should be modified to use the dbms_lob.substr() function on all CNLOB columns in the zabbix database in conjunction with DISTINCT queries.
- is duplicated by
-
ZBX-19797 Actions operations haven't been working since upgrade from 5.2 to 5.4
- Closed