MS SQL Transaction Log Errors

Hi,

I'm running the MSSQL Beat and I get some error messages.

This is my connection string:
sqlserver://login:password@localhost:1433/instance_name

In the explorer field I get the following error message in the transaction_log dataset.

error scanning single result: sql: expected 4 destination arguments in Scan, not 5

error scanning single result: mssql: Invalid object name 'sys.dm_db_log_stats'.

I can read the performance data of the MS SQL database.

Do you know where this issue may come from?

Thank you.

@SvenC56 Thanks for posting! Quick question, what version of Metricbeat and what version of MSSQL are you using?

Hi,
thank you for the fast response.
We use Microsoft SQL Server Standard Edition (64-bit) in version 11.0.5058 SP2, the language is set to English (United States), sorting Latin1_General_CI_AS.
We use a virtual instance hence the connection string. The default database is set to master.

We use the complete ELK Stack + Metricbeat in Version 7.3.

@Mario_Castro I tracked down to the source code but still not sure why hmmm Can I get help please? Thanks!!

Hi @SvenC56 :slight_smile:

I'm afraid that the transaction_log Metricset is only compatible with SQL Server 2017 and up. You version seems to be from 2012 according to this table I found https://sqlserverbuilds.blogspot.com/

It looks for the table sys.dm_db_log_stats which was introduced in version 2017 as an enhancement in Dynamic management views

Hi,
I can confirm it works with our 2017 instance.

Thank you both for the help! :slight_smile: