SQL Server 2008 No longer supported
Looks like the minimum target platform was changed to SQL 2012 in order to query availability replicas, which aren't available in 2008. What this means is that it is now impossible to deploy to SQL 2008 but it was not the intention. Other than the above there is nothing that would stop supporting SQL 2008. I will look into how to make this work but for the time being, if you are on SQL 2008 you'd need to pull the source code and exclude references to availability replicas, then build for SQL 2008.
Things that are currently failing to build for 2008:
- Extended Sessions
-
sys.dm_hadr_availability_replica_statesinvw_sqlwatch_sys_databases -
with resultsstatements
Based on my checks, version 1.3.3 is the last one that works with SQL Server 2008.
Installation steps
-
Download release https://github.com/marcingminski/sqlwatch/releases/download/1.3.3/SQLWATCH_1.3.3.zip
-
[Optional] Create empty database to avoid issues related to collation (https://docs.sqlwatch.io/known-issues/#collation-conflict)
- Name: SQLWATCH
- Compatibility Level: SQL Server 2008 (100)
- The alternative installation option with SqlPackage was the easiest for me. Open terminal and cd into folder containing SqlPackage.exe (for me it is
C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin) and run command:
SqlPackage.exe /Action:Publish /SourceFile:{{PathToSqlWatch}}\SQLWATCH.dacpac /TargetDatabaseName:
SQLWATCH /TargetServerName:{{ServerName}} /p:RegisterDataTierApplication=True
Usage
- Extract release locally and open
SQLWATCH Performance Dashboard.pbitin PowerBI Desktop or another template - Parameters:
- ReportIntervalMinutes: 1 or 5
- DatabaseName: SQLWATCH
- ServerName: your server name
- ReportAgeHours: how many hours to include in the report
- EndTime: report end time in format: 'YYYY-MM-DD HH:MM:SS' (quotes are needed)
- To skip confirmation for internal queries every time, turn off security setting: https://learn.microsoft.com/en-us/power-query/native-database-query#native-database-query-security
Uninstallation steps
https://docs.sqlwatch.io/installation/removal/#manually
- there are no session events in this version
- some SQL Jobs are prefixed with
DBA-PERF-*, these need to be deleted as well