What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

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

Votes:

0

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

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



16 Replies

Votes:

0

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

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

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



Votes:

0

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

Version is PRTG Network Monitor 17.1.28.1032

Created on Feb 28, 2017 2:27:18 PM

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



Votes:

1

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

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



Votes:

1

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

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



Votes:

0

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

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

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



Votes:

0

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

Screenshot wast sent yesterday but was not uploaded to this site

Created on Mar 8, 2017 7:56:56 AM



Votes:

0

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

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



Votes:

0

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]



Votes:

0

For what it's worth: In our case SP_DATABASES_DATABASE_SIZE.sql which contains the command sp_databases, was addressing a query that was specified to max out at a DB size of 2TB.

When that was exceeded, a value of NULL was returned. As that is not a figure, PRTG threw this error: [System.String] value can not be parsed. Please keep in mind that any date or time formats need to use the "EN-US" format.

See limitation set to size in ddl of the stored procedure:

create procedure sys.sp_databases as set nocount on

select DATABASE_NAME = db_name(s_mf.database_id), DATABASE_SIZE = convert(int, case -- more than 2TB(maxint) worth of pages (by 8K each) can not fit an int... when sum(convert(bigint,s_mf.size)) >= 268435456 then null else sum(convert(bigint,s_mf.size))*8 -- Convert from 8192 byte pages to Kb end), REMARKS = convert(varchar(254),null) from sys.master_files s_mf where s_mf.state = 0 and -- ONLINE has_dbaccess(db_name(s_mf.database_id)) = 1 -- Only look at databases to which we have access group by s_mf.database_id order by 1

Create a new version, e.g. sp_databasesV2, where that limitation is removed and put that in the file SP_DATABASES_DATABASE_SIZE.sql instead.

Created on Feb 14, 2023 10:33:10 AM




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.