SQL-Server-Metrics-Pack icon indicating copy to clipboard operation
SQL-Server-Metrics-Pack copied to clipboard

Index Metrics - SQL 2014 'compression_delay' Error

Open ericcobb opened this issue 6 years ago • 3 comments

Running the procedure loadIndexMetrics in SQL 2014 SP3 errored out: Invalid column name 'compression_delay'

select compression_delay from sys.indexs Msg 207, Level 16, State 1, Line 313 Invalid column name 'compression_delay'.

ericcobb avatar Oct 23 '19 14:10 ericcobb

There's another tiny bug too, the "vwIndexMetrics_GetScripts" function creation code contains a "FROM [master].[dbo].[vwIndexMetrics_CurrentActiveIndexMetrics]" which is wrong, since that view doesn't exist in the "master" DB and causes the "index-metrics-install.sql" to fail

almost-everyone avatar Dec 20 '19 11:12 almost-everyone

As for the "compression_delay" a quick workaround is to change the script line to "''DATA_COMPRESSION='' + p.data_compression_desc + '', COMPRESSION_DELAY = '' -- + CAST(ix.compression_delay AS VARCHAR(MAX))" this won't report any value in that column but at least will allow the script to work in older MSSQL versions (tried on 2008r2)

almost-everyone avatar Dec 20 '19 11:12 almost-everyone

There's another tiny bug too, the "vwIndexMetrics_GetScripts" function creation code contains a "FROM [master].[dbo].[vwIndexMetrics_CurrentActiveIndexMetrics]" which is wrong, since that view doesn't exist in the "master" DB and causes the "index-metrics-install.sql" to fail

Thanks for letting me know! I've removed the hard coding to the "master" database.

ericcobb avatar Dec 24 '19 15:12 ericcobb