Solved

list compress tables

Posted on 2011-09-02
3
296 Views
Last Modified: 2012-05-12
Hello,

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

Thanks

bibi
0
Comment
Question by:bibi92
3 Comments
 
LVL 9

Expert Comment

by:Tehzar
ID: 36474579
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
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 36476462
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
 

Author Closing Comment

by:bibi92
ID: 36482813
Thanks bibi
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question