Quantcast
Channel: THWACK: All Content - Network Performance Monitor
Viewing all articles
Browse latest Browse all 21870

Custom Poller Alert - SQL Error All Of A Sudden

$
0
0

Hey All,

 

I have a few customer poller alerts that have been running for 4+ years thanks to the help from a few people here: Re: Custom Poller Alert Short explanation - all these do is put the current status, input voltage, and battery capacity of a UPS in one message when it loses AC power.

Recently, the messages being sent from these alerts have contained an SQL error referencing an ambiguous column name.  I am no SQL expert at all, so here I am asking for some help.  Nothing has changed in either the SQL server, the Orion server, or the alerts themselves.... other than possible software updates from SW (NPM and NTA).

 

The original alert outgoing message is written like this:

 

UPS has been ${SQL:Select Status From CustomPollerAssignment as Assignment, CustomPollerStatus as Status where Assignment.CustomPollerAssignmentID = Status.CustomPollerAssignmentID and Assignment.NodeID = ${NodeID} and Assignment.AssignmentName like 'CVMupsPowerSource%'} for 60 minutes.

 

So, to make it perform better when running the query manually, I have removed all of the NPM related formatting and used a Node ID that I know works, making the SQL query look like this:

 

Select Status From CustomPollerAssignment as Assignment, CustomPollerStatus as Status where Assignment.CustomPollerAssignmentID = Status.CustomPollerAssignmentID and Assignment.NodeID = 530 and Assignment.AssignmentName like 'CVMupsPowerSource%'

 

When I run this query I get the following with the first "Status" underlined:

Msg 209, Level 16, State 1, Line 2

Ambiguous column name 'Status'.

 

Soooo.... I read some stuff about trying to use tablename.columnname, and assuming I understand the query, I tried CustomerPollerAssignment.Status, and get an error that the multi-part identifier can't be found.  This is where I get lost.

 

Any help is appreciated.  Thanks in advance.

 

Aaron


Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>