Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

list compress tables

Hello,

How can I list compress tables with T-SQL query?

Thanks

bibi
0
bibi92
Asked:
bibi92
1 Solution
 
TehzarCommented:
You can find more helpful T-SQL bits here:

http://www.devx.com/tips/Tip/28529

HTH,

ZaR
Select Table_name as "Table name"
From Information_schema.Tables
Where Table_type = 'BASE TABLE' and Objectproperty 
(Object_id(Table_name), 'IsMsShipped') = 0

Open in new window

0
 
Anthony PerkinsCommented:
This is how you do it:
SELECT  t.name
FROM    sys.tables t
        INNER JOIN sys.partitions p ON t.object_id = p.object_id
WHERE   p.data_compression IN (1, 2)

Open in new window

0
 
bibi92Author Commented:
Thanks bibi
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now