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

MSSQL customquery parameter not working as DBtable name

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 6.0.34, 7.0.4, 7.2.0alpha1
    • Windows Agent2 7.0.4 with MSSQL plugin

      Steps to reproduce:

      1. Send Paramater as value for where section works.
      2. Send it as part of table name, section from doesn't

      Result:
      Error from step 2:

      "Failed to execute handler: failed to execute handler: failed to query: mssql: Must declare the table variable "@p1"."
      Hardcoding the table name in the customquery returns the expected query result.

      Using the @p1 parameter value somewhere else in the query like the coal_chamber.sql example works fine as well. But only not in the from section of the query.

            zit Zabbix Integration Team
            Brambo KB
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: