Add sp_estimate_data_compression_savings to SQL Azure Database
Now Data Compression is available in Azure SQL Database (https://msdn.microsoft.com/en-us/library/cc280449.aspx), but the spestimatedatacompressionsavings is not available yet. The error message is:
Msg 534, Level 16, State 1, Procedure spestimatedatacompressionsavings, Line 20 [Batch Start Line 14]
'spestimatedatacompressionsavings' failed because it is not supported in the edition of this SQL Server instance 'MSSQLSERVER'. See books online for more details on feature support in different SQL Server editions.
The workaround is to create another copy via database backup, compress and compare the table and index. But it takes more time, resource and money to get the result.
chris wood commented
anyone got this running to pull out all tables and indexes in a db ?
MEHUL RAMANI commented
This should be the default sp.
Mark Freemn commented
Kalen Delaney found that Microsoft just needs to add a few system functions (that are in SQL Server but not in Azure SQL Database) and remove the code that generates that exception for Azure SQL Database. If it's really that easy, why can't Microsoft just do this?
Kalen Delaney commented
I have written a blog post that contains a copy of a procedure I wrote to do the same thing that sp_estimate_data_compression_savings does, and it works on Azure SQL DB.