Friday, June 18, 2010

SQL Server Finding Compressed Objects

I haven't been able to find a gui tool in the management console that will quickly tell you the compression status of an object. Below is a dirty script to find objects partitions that are compressed. It doesn't do much as far as taking to the next level such as returning index name and so forth, just for quick investigation


 

select
*
from
sys.partitions p

inner
join
sys.objects o

on o.object_id
= p.object_id

where data_compression != 0

No comments: