New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Sensor Microsoft SQL v2 return error: [System.String] value can not be parsed. Please keep in mind

Votes:

0

Your Vote:

Up

Down

Hi,

i have problem with created Microsoft SQL v2 sensor. Sensor return error: Id 3: "" [System.String] value can not be parsed. Please keep in mind that any date or time formats need to use the "EN-US" format. More info from log file:

27.02.17 16:06:49: Execution Time: return 31.2499 [Double]
27.02.17 16:06:49: Query Execution Time: return 0 [Double]
27.02.17 16:06:49: Affected Rows: return 5 [Int64]
27.02.17 16:06:49: Id 3: String found(""). Trying to parse as Int64, Double, TimeSpan or DateTime. 
27.02.17 16:06:49: Id 3: "" [System.String] value can not be parsed. Please keep in mind that any date or time formats need to use the "EN-US" format.

Ivos

microsoft prtg sqlsensor

Created on Feb 27, 2017 3:31:35 PM by  Ivos (0) 1

Last change on Jul 27, 2018 12:59:47 PM by  Luciano Lingnau [Paessler Support]



15 Replies

Votes:

0

Your Vote:

Up

Down

Hi there,

Please make sure that the query always returns a valid value. In your case it returns nothing, therefore PRTG can't parse the value.

Best regards.

Created on Feb 28, 2017 9:41:56 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Dariusz,

here is full log where are renamed information about my DB. From this log is visible that was received data from 2 Columns and 5 Rows

27.02.17 16:33:40: Impersonating 'aaa\bbb'
27.02.17 16:33:40: Connections String: Data Source=xxx\yyy,1437;Initial Catalog=nnn;Integrated Security=True;Connect Timeout=60
27.02.17 16:33:40: Opening Connection to MSSQL Server 'xxx\yyy'
27.02.17 16:33:40: Running Command 'SELECT 	 	hhh, 	bbb 	FROM ccc WHERE 	eee  > dateadd(hh,-3,getdate()) AND 	fff  < getdate()  ORDER BY fff DESC'
27.02.17 16:33:40: Received Data Table with 2 Columns and 5 Rows
27.02.17 16:33:40: Closing Connection to MSSQL Server 'xxx\yyy'
27.02.17 16:33:40: Execution Time: return 62.5054 [Double]
27.02.17 16:33:40: Query Execution Time: return 0 [Double]
27.02.17 16:33:40: Affected Rows: return 5 [Int64]
27.02.17 16:33:40: Id 3: String found(""). Trying to parse as Int64, Double, TimeSpan or DateTime. 
27.02.17 16:33:40: Id 3: "" [System.String] value can not be parsed. Please keep in mind that any date or time formats need to use the "EN-US" format.

Best regards

Ivos

Created on Feb 28, 2017 10:42:18 AM by  Ivos (0) 1

Last change on Feb 28, 2017 10:45:37 AM by  Sven Roggenhofer [Paessler Technical Support]



Votes:

0

Your Vote:

Up

Down

What actual PRTG version are you running? Could you post the settings of the sensor (How to embed pictures)?

Created on Feb 28, 2017 12:01:57 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Version is PRTG Network Monitor 17.1.28.1032

Created on Feb 28, 2017 2:27:18 PM by  Ivos (0) 1

Last change on Feb 28, 2017 2:48:27 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Could you run the following EXE, add all parameters including the query: C:\Program Files (x86)\PRTG Network Monitor\Sensor System\SQLv2.exe ...and post the results?

Created on Mar 1, 2017 9:10:34 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Do you mean run follow: C:\Program Files (x86)\PRTG Network Monitor\Sensor System\SQLv2.exe xxx.sql >>C:\temp\output.txt ?

Created on Mar 1, 2017 2:32:01 PM by  Ivos (0) 1



Votes:

0

Your Vote:

Up

Down

No, simply double-click it, a gui will open and you can fill in the data :)

Created on Mar 1, 2017 3:12:35 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This is result. title_ad is row name in table. Other in result names was changed (it are not public data).

01.03.17 16:57:37: Impersonating 'vvv\uuu' 01.03.17 16:57:37: Connections String: Data Source='xxx\yyy';Initial Catalog=ttt;Integrated Security=True 01.03.17 16:57:37: Opening Connection to MSSQL Server 'xxx\yyy' 01.03.17 16:57:37: Running Command 'SELECT

xxx._name, yyy_log.errors FROM yyy_log WHERE yyy.begin_datetime > dateadd(hh,-3,getdate()) AND yyy.begin_datetime < getdate() ORDER BY yyy.begin_datetime DESC' 01.03.17 16:57:37: Received Data Table with 2 Columns and 5 Rows 01.03.17 16:57:37: Closing Connection to MSSQL Server 'xxx\yyy' 01.03.17 16:57:37: title_ad: String found(""). Trying to parse as Int64, Double, TimeSpan or DateTime. 01.03.17 16:57:37: title_ad: "" [System.String] value can not be parsed. Please keep in mind that any date or time formats need to use the "EN-US" format.

Created on Mar 1, 2017 4:11:54 PM by  Ivos (0) 1



Votes:

0

Your Vote:

Up

Down

Could you post a screenshot of that? And from an actual SQL client that executes the query?

Created on Mar 2, 2017 1:42:37 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Original is query run from SQL Server 2014 Management Studio but for this problém is exit is from C:\Program Files (x86)\PRTG Network Monitor\Sensor System\SQLv2.exe or from PRTG sensor Microsoft SQL v2

Created on Mar 7, 2017 7:29:43 AM by  Ivos (0) 1

Last change on Mar 7, 2017 7:43:04 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I also need a screenshot of the actual result from the management studio, as stated in my previous post :)

Created on Mar 7, 2017 7:43:49 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Screenshot wast sent yesterday but was not uploaded to this site

Created on Mar 8, 2017 7:56:56 AM by  Ivos (0) 1



Votes:

0

Your Vote:

Up

Down

I didn't publish it since you censored the columns in the original post, hence I considered them confidential :) Could you try to cast the actual values (https://msdn.microsoft.com/de-de/library/ms187928.aspx) as integers? Not sure why they're stored as strings within the database.

Here's another example.

Created on Mar 8, 2017 10:15:03 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I've got the same problem, does the sensor allow only numerical value? I've got a string result cause it's the real value I need to know, isn't possibile to use it?

Created on Aug 30, 2017 6:45:39 AM by  Andrea (227) 1 2



Votes:

0

Your Vote:

Up

Down

Hi Andrea,

In order to evaluate strings, please check the following article:
How can I monitor strings from an SQL database and show a sensor status depending on it?


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 30, 2017 6:59:06 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.