tag:blogger.com,1999:blog-2931150950398014304.post4721946117298918569..comments2023-03-28T21:06:53.734+10:00Comments on MatticusAU Blog: TSQL to identify Compression Type on Indexes within a SQL 2008 or greater databaseMatt Laveryhttp://www.blogger.com/profile/07962199415215786355noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-2931150950398014304.post-47088360412970130482015-04-29T06:27:31.456+10:002015-04-29T06:27:31.456+10:00Great script! This combined with my quicky script...Great script! This combined with my quicky script (below) to find DB's with Enterprise features provided me with exactly what I needed to easily find and remove compression so we could downgrade from Enterprise to Standard. Thank you!<br /><br />EXEC sp_msforeachdb 'use [?]<br />BEGIN<br />DECLARE @dbname varchar(25)<br />SET @dbname= ''?''<br />END<br /><br />DECLARE @tsql nvarchar(1000)<br />SET @tsql = ''SELECT DB_NAME() dbName, feature_name, feature_id FROM sys.dm_db_persisted_sku_features''<br />EXEC (@tsql)'<br />Anonymoushttps://www.blogger.com/profile/04898766198417505649noreply@blogger.comtag:blogger.com,1999:blog-2931150950398014304.post-24431414451251097092015-02-24T13:41:57.936+10:002015-02-24T13:41:57.936+10:00Table compression is just compression of the Clust...Table compression is just compression of the Clustered index. So the above scripts should provide the information you are seeking.Matt Laveryhttps://www.blogger.com/profile/07962199415215786355noreply@blogger.comtag:blogger.com,1999:blog-2931150950398014304.post-44432559965787750982013-11-14T00:16:11.044+10:002013-11-14T00:16:11.044+10:00Great script is there away to use this for Table c...Great script is there away to use this for Table compression not indexsbar15https://www.blogger.com/profile/16008333717011213970noreply@blogger.com