SQL Login failed: Attempting to use an NT account with SQL Server Authentication

Started by mashedpotatorocket, March 16, 2023, 11:24:19 AM

Previous topic - Next topic

mashedpotatorocket

I'm trying to connect to an MS SQL Server for some application monitoring. This is my agent conf:

SubAgent = dbquery.nsm

*DBQUERY
Database = id=db1;driver=mssql.ddr;server=SQLSERVER;dbname=master;login=DOMAIN\Svc_User;password=secretpassword
Query = ProcessMemory:db1:600:SELECT physical_memory_in_use_kb*1024 AS sql_physical_memory_in_use_MB FROM sys.dm_os_process_memory

This is the error I get in agent log:

DBQUERY: cannot connect to database db1 ([Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'DOMAIN\Svc_User'.)

And this is the error I see in the SQL Server log:

Login failed for user 'DOMAIN\Svc_User'. Reason: Attempting to use an NT account name with SQL Server Authentication. [CLIENT: <local machine>]

The SQL Server is set to "SQL Server and Windows Authentication mode", but I get the feeling nxagent tries to connect using an SQL account rather than an AD account.

Is it possible to connect with a domain user or do I have to use a local sql account?

(Using nxagent 4.2.461)

Victor Kirhenshtein

You should create local SQL account. It should be also possible to login with the same AD user NetXMS agent runs under (in that case you should specify * as login name and password is not needed). 

Best regards,
Victor