marcingminski / sqlwatch

SQL Server Performance Monitor
https://docs.sqlwatch.io
Other
424 stars 168 forks source link

SQLWATCH-LOGGER-PERFORMANCE job doesn't work if SQL Server uses binary collation #484

Open corelevel opened 9 months ago

corelevel commented 9 months ago

Did you check DOCS to make sure there is no workaround? Yes

Describe the bug Job [SQLWATCH-LOGGER-PERFORMANCE] is failing with:

Date 10/17/2023 18:45:33 Log Job History (SQLWATCH-LOGGER-PERFORMANCE)

Step ID 3 Server Job Name SQLWATCH-LOGGER-PERFORMANCE Step Name dbo.usp_sqlwatch_logger_xes_blockers Duration 00:00:00 Sql Severity 16 Sql Message ID 25718 Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message Executed as user: . The log file name "(null)" is invalid. Verify that the file exists and that the SQL Server service account has access to it. [SQLSTATE 42000] (Error 25718). The step failed.

To Reproduce Steps to reproduce the behavior:

  1. Install SQL Server with using binary collation
  2. Install SQLWatch
  3. Job [SQLWATCH-LOGGER-PERFORMANCE] will be failing

Expected behavior Job [SQLWATCH-LOGGER-PERFORMANCE] will be running without issues

Windows Server (please complete the following information):

SQL Server (please complete the following information):

SQL Server Management Studio (SSMS -> about -> copy info): SQL Server Management Studio 19.0.20209.0+f9a9d8f6 SQL Server Management Objects (SMO) 16.200.48036.0+7d3b143d945e1aa638acdb02c0364e263d5ec973 Microsoft T-SQL Parser 16.0.22524.0+62eedb15cd3cde34e51c8fbbdf9b06e575ec912e Microsoft Analysis Services Client Tools 16.0.19993.0 Microsoft Data Access Components (MDAC) 10.0.17763.4644 Microsoft MSXML 3.0 6.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 10.0.17763

SQLWATCH version (from DACPAC or from sysinstances)

Additional context There is a simple modification to fix that, we just need to replace 'SQLWATCH_Blockers' with 'SQLWATCH_blockers' in the usp_sqlwatch_logger_xes_blockers stored procedure.

It looks like other usp_sqlwatch_logger_xes* stored procedures don't have such issues.