Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-2392

Query failed for Oracle

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.4
    • 1.8.4
    • Frontend (F)
    • None
    • Oracle 10g2

      ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00904: "CNT": invalid identifier[/var/www/zabbix/include/db.inc.php:444]
      SQL error [ORA-00904: "CNT": invalid identifier] in [SELECT key_, count(*) as cnt FROM items WHERE (hostid IN (30103)) GROUP BY key_ HAVING cnt > 1]
      ocifetchinto() [<a href='function.ocifetchinto'>function.ocifetchinto</a>]: ORA-24374: define not done before fetch or execute and fetch[/var/www/zabbix/include/db.inc.php:597]
      ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00904: "CNT": invalid identifier[/var/www/zabbix/include/db.inc.php:444]
      SQL error [ORA-00904: "CNT": invalid identifier] in [SELECT name, count(*) as cnt FROM applications WHERE (hostid IN (30103)) GROUP BY name HAVING cnt > 1]
      ocifetchinto() [<a href='function.ocifetchinto'>function.ocifetchinto</a>]: ORA-24374: define not done before fetch or execute and fetch[/var/www/zabbix/include/db.inc.php:597]

      Oracle not understand aliases in GROUP BY, ORDER BY, HAVING.
      Need:
      SELECT key_, count as cnt FROM items WHERE (hostid IN (30103)) GROUP BY key_ HAVING count > 1;

            Unassigned Unassigned
            dotneft Alexey Pustovalov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: