Applications Systems

SQL template error: Query must return at least 1 row

This article addresses an SQL template error in SAM 6.4 and higher. Error: Query must return at least 1 row.

First published date

11/14/2018 7:32 PM

Last published date

11/14/2018 7:32 PM

Overview

When you open the SQL template, the following error is displayed:

Error: Testing on node failed with down status. query must return at least 1 row

Product section

Server Application Monitor

Cause

The SQL query is not returning any rows of data.

Resolution

  1. Click Edit Application Monitor.
  2. Copy the SQL query.
  3. Run the query in the Microsoft SQL Server Management Studio for the initial catalog or database specified in the monitor.
    If the SQL query returns 0 rows, rewrite the query so at least one row is returned.