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

Microsoft SQL v2

Votes:

0

Hallo,

ich habe ein Problem mit dem Microsoft SQL v2 Sensor. Der Sensor im PRTG zeigt folgenden Fehler:

Fehler bei der Anmeldung für den Benutzer 'DOMÄNE\admin'.(Connectionstring: Data Source=xxx-sql;Initial Catalog=xxdaten;User ID=DOMÄNE\admin;Password=;Connect Timeout=60)

Über die SQLv2.exe auf dem PRTG Server kann ich Problemlos eine Abfrage durchführen. Siehe Screenshot

Um mir den String für die SQLv2.exe anzuzeigen habe ich die Datenbank absichtlich falsch umbenannt. Dann erhalte ich folgende Meldung:

'DOMÄNE\admin'.(Connectionstring: Data Source=xxx-sql;Initial Catalog=xxdate;Integrated Security=True;Password=)

Beim Vergleichen der beiden Stings ist mir kein Fehler aufgefallen. Alle Zugangsdaten sind richtig... Was könnte die Ursache für die Fehler Meldung im PRTG sein?

connection-string microsoft-sql-v2 sql-v2

Created on Oct 5, 2018 11:10:47 AM

Last change on Oct 8, 2018 10:27:35 AM by  Luciano Lingnau [Paessler]



3 Replies

Votes:

0

Hello georgi,
thank you for your inquiry.

To make sure that as much customers as possible can profit from our reply, I'll reply in English.

The only explanation I can think of, is that the credentials in PRTG aren't identical:

Should the issue persist, please configure the following option in the deployed/failing sensor:

Sensor ResultWrite sensor result to disk

After one scanning interval, share the logs that will be generated on the PRTG Probe where the sensor was deployed. The default path of the sensor logs folder is:

C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)\

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Oct 8, 2018 10:34:27 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hello Luciano,

Here is the log "Result of Sensor 8548.Data.txt":

Data['blockedsens'].asString := '';
Data['canlinux'].asString := '0';
Data['channelids'].asString := '';
Data['channelinfos'].asString := '{"0":{"Unit":"oukTimeResponse","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"1":{"Unit":"oukTimeResponse","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"2":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""}}';
Data['channelnames'].asString := 'Ausführungsdauer'#$D#$A + 
'0'#$D#$A + 
'Abfrageausführungsdauer'#$D#$A + 
'1'#$D#$A + 
'Betroffene Zeilen'#$D#$A + 
'2'#$D#$A + 
'';
Data['environment'].asString := '';
Data['exefile'].asString := 'SQLv2.exe';
Data['exeparams'].asString := '"-dbuser=xxx\admin" "-dbpass=***" "-host=xxx-sql" "-dbauth=1" "-database=xxxdaten" "-timeout=60" "-server=mssql" "-handledbnull=1" "-querytype=ChangeDB" "-transaction=noTransaction" "-selectvalue=ColumnID" "-channelids=" "-selectors=" "-includeruntime=1" "-isdif=" "-enforceencryption=0" "-sqlpath=C:\Program Files (x86)\PRTG Network Monitor\custom sensors\sql\mssql\Demo Serveruptime.sql" "-writefile=C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)\Result of Sensor 8548.log"';
Data['fastcount'].asString := '0';
Data['host'].asString := 'xxx-sql';
Data['hostv6'].asString := '';
Data['inerror'].asString := '';
Data['ipversion'].asString := '0';
Data['isdif'].asString := '';
Data['isexesensor'].asString := '1';
Data['lastuptime'].asString := '0';
Data['linuxlogindomain'].asString := '';
Data['linuxloginpassword'].asString := '';
Data['monitorchange'].asString := '0';
Data['mutexname'].asString := '';
Data['notonpod'].asString := '0';
Data['password'].asString := '***';
Data['query'].asString := 'Demo Serveruptime.sql';
Data['reboot'].asString := '43380.4729617593';
Data['reqmsginterval'].asString := '0';
Data['resultfile'].asString := 'Result of Sensor 8548.txt';
Data['sensorid'].asString := '8548';
Data['simulate'].asString := '0';
Data['timeout'].asString := '60';
Data['tlsexplicit_default'].asString := '';
Data['tlsexplicit_ftp'].asString := '';
Data['tlsexplicit_imap'].asString := '';
Data['tlsexplicit_pop3'].asString := '';
Data['tlsexplicit_port'].asString := '';
Data['tlsexplicit_smtp'].asString := '';
Data['uptimecount'].asString := '0';
Data['usednstime'].asString := '0';
Data['windowslogindomain'].asString := 'xxx';
Data['windowsloginpassword'].asString := '***';
Data['windowsloginusername'].asString := 'administrator';
Data['writeresult'].asString := '1';

Result of Sensor 8548.log:

08.10.18 13:21:04: Connections String: Data Source=xxx-sql;Initial Catalog=xxxdaten;User ID=xxxxx\admin;Password=***********;Connect Timeout=60
08.10.18 13:21:04: Opening Connection to MSSQL Server 'xxx-sql'
08.10.18 13:21:04: Closing Connection to MSSQL Server 'xxx-sql'

Result of Sensor 8548.txt:

<?xml version="1.0" encoding="utf-8"?>
<prtg>
  <error>1</error>
  <text>Fehler bei der Anmeldung für den Benutzer 'xxx\admin'.(Connectionstring: Data Source=xxx-sql;Initial Catalog=daten;User ID=xxx\admin;Password=;Connect Timeout=60)</text>
</prtg>

I changed some Login Information in the log

Created on Oct 8, 2018 12:03:39 PM

Last change on Oct 9, 2018 5:51:09 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hello georgi,
thank you for your reply.

What happens if you log-on the remote probe as "xxx\administrator" (Data['windowslogindomain']\Data['windowsloginusername']) and run the SQLv2.exe file with the following parameters?

"-dbuser=xxx\admin" "-dbpass=xxxx" "-host=xxx-sql" "-dbauth=1" "-database=xxxdaten" "-timeout=60" "-server=mssql" "-handledbnull=1" "-querytype=ChangeDB" "-transaction=noTransaction" "-selectvalue=ColumnID" "-channelids=" "-selectors=" "-includeruntime=1" "-isdif=" "-enforceencryption=0" "-sqlpath=C:\Program Files (x86)\PRTG Network Monitor\custom sensors\sql\mssql\Demo Serveruptime.sql"

In theory, it should fail too. But since you previously mentioned that this worked using the GUI of the SQLv2.exe we're wondering how this will behave.

And one question about the setup: In the settings of the device in PRTG, under Credentials for Database Management Systems are you using Windows authentication with impersonation or SQL server authentication ? Because a mismatch here is one of the only things that might explain this behavior.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Oct 9, 2018 5:59:50 AM by  Luciano Lingnau [Paessler]

Last change on Nov 30, 2018 12:57:51 PM by  Luciano Lingnau [Paessler]




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.