Page 1 of 1

Unable to connect to MSSQL using user Macros

Posted: Thu Jan 02, 2020 4:23 pm
by mohan.sharma
Hi All,

I am getting error when I add service account in user macros.

$USER1$=[DOMAIN\USERNAME]
$USER2$=PASSWROD

When I add new MS SQL server to monitor using user macros 1&2 , it is giving error but when I type domain\username and pass $USER2$ in password it works fine.

Please let me know which format I should pass the service account in user macros.

Re: Unable to connect to MSSQL using user Macros

Posted: Thu Jan 02, 2020 4:53 pm
by tgriep
Couple of things to try.
When using the backslash between the domain and username, it should be escaped so add a second back slash like the example below.

Code: Select all

$USER1$=DOMAIN\\USERNAME
Sometimes, using a forward slash works as well.

Code: Select all

$USER1$=DOMAIN/USERNAME

Re: Unable to connect to MSSQL using user Macros

Posted: Thu Jan 02, 2020 5:05 pm
by mohan.sharma
I am getting below error
(18452, 'Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20002, severity 9:\nAd

Re: Unable to connect to MSSQL using user Macros

Posted: Thu Jan 02, 2020 5:13 pm
by mohan.sharma
All set by using below format

$USER1$='DOMAIN\\USERNAME'

Re: Unable to connect to MSSQL using user Macros

Posted: Thu Jan 02, 2020 5:22 pm
by tgriep
I was just going to post that but thanks for letting us know that you figured it out.