Hallo zusammen

Ist es möglich mit einem SLQ-Sensor (Oracle DB) mehrere Stringzeilen und mehrere Spalten zurückzugeben und diese dann auszuwerten?

Anwendungsbeispiel: select username,account_status from dba_users;

Wir möchten nun z.B. den username prüfen und den account_status Username=‘SYSMAN‘ und account_status=‘LOCKED‘ dann soll eine Error ausgeben werden.

Hilfreich wäre wenn die ganze Zeile, welche den Treffer enthält irgendwo ausgegeben wird.

Vielen Dank und Gruss Marcel


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Guten Tag,

das ist leider nicht möglich. Der SQL-Sensor kann nur einen String als Message oder eine Zahl als Wert verarbeiten.

mit freundlichem Gruß.


Jan, 2013 - Permalink

Hi Marcel,

In your example a query like

SELECT COUNT(*)
    FROM dba_users
    WHERE Username=‘SYSMAN‘ AND account_status=‘LOCKED‘ 

Will return 1 when the account in question is locked.

Using limits you can set the sensor to an error state when this condition occurs.

Regards,


Jan, 2013 - Permalink

Dear all Thank you very much for your helpful answers. We will try to configure these sensors the way to display at least an error with a limitation. Is there a future release or update with the possibilty to display more than just an error on limitation?

Thnx and rgds Marcel


Jan, 2013 - Permalink