The following custom checking point was added to the sqlserver probe and noticed that 0 rows are returned when running sqlserver probe -> Query -> Test option even though the query works fine with SQL Server Management Studio
use <databasename>
select count(*) as count from <tablename>
sqlserver_monitor.log entries
sqlserver: (doQuery) Profile: test query profile/test query checkpoint, doQuery test query starting
sqlserver: doQuery qeury text use <databasename>
select count(*) as count from <tablename>
sqlserver: (doQuery) Retry : 0 - Query Execution Failed - State : 0 - Profile : test query profile
sqlserver 5.61+
This behavior is expected when the 'use <database>' parameter is included in custom query and the sqlserver probe connection is configured with Windows Authentication with TLS option enabled.
See sqlserver probe Known Issues and Workarounds