Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index Metrics - SQL 2014 'compression_delay' Error #2

Open
ericcobb opened this issue Oct 23, 2019 · 3 comments
Open

Index Metrics - SQL 2014 'compression_delay' Error #2

ericcobb opened this issue Oct 23, 2019 · 3 comments

Comments

@ericcobb
Copy link
Owner

ericcobb commented Oct 23, 2019

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'.

@almost-everyone
Copy link

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
Copy link

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)

@ericcobb
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants