Trying to use SQLxpXML.EXE to get some data from SQL Server, I'm getting constant errors. What have i done: - changed PRTG services to run under user account - set "Set placeholders as environment values" - security is on "Use security context of probe service"

It' looks like that EXE is trying to connect witg some diferent username to SQL that it's set in parameters "-d=master -sp=prtg_getdbsize -s=Computer -u=UserName -p=Password"

PRTG Network Monitor 9.1.0.1581, OS Is Windows 7 64bit - I'm testing freeware sollution


Article Comments

Hello,

can you manually run this executable with these parameters on the PRTG host?

best regards.


Sep, 2011 - Permalink

Yes, If I run it manually it returns XML from my stored procedure, I'm logged in as same accoutn as prtg probe service runs.


Sep, 2011 - Permalink

A few thoughts:

Is the prtg_getdbsize procedure created in the master database like your parameters suggest?

Do the credentials that you supply have enough rights to execute the storred procedure in that database?

Do any of the parameters contain a white space? If so, the parameter must be supplied between double quotes like

-d="my database"

What errors do you exactly get?


Sep, 2011 - Permalink

No whitespaces,.. interesting is, that I get login failed for user "'password\username", I have no idea how it's constructed from my parameters to the sql server login,... hm, hm,..


Sep, 2011 - Permalink

The domain name as entered in the devices windows credentials (or inherited from its group) is prefixed to the username.

Username and password can be overwritten by the optional -u= and -p= parameters, domain name (if not left blank) is always prefixed

It looks like you have entered the password somewhere in the domain name setting.


Sep, 2011 - Permalink

I have deleted device and reconfigure everything, carefully made domain, username and password inputs. Standard SQL sensor works, but when setting up XMLCustom via SQLspXML.exe, error stays the same... PS I've intentionally typed wrong password, then I got "Access denied. Please check your Windows credentials. (code: PE095)", ..


Oct, 2011 - Permalink

Version 8.0.2 of the sensor is online now with the following changes:

  • Changed: dropped the "environment placeholders" support, all parameters need to be supplied through the command line now.
  • New: option to use SQL authentication. (by default Windows Authentication is used now)

Oct, 2011 - Permalink

Done update server (from 9.1.1.1620 to 9.1.0.1581) and update custom sensor to 8.0.2 and now it works! :)

PS I tried to pick up values from remote SQL server, created same sensor, with same parameters (just change -s= to remote name), than I got login failed "DOMAIN\Username" (no longer PASSWORD\username), ... which is strange because it should use native sql authentication, but anyway I can use domain privileged user (like admin) for workaround, ...

Tnx, for help!


Oct, 2011 - Permalink