Solved

list compress tables

Posted on 2011-09-02
3
295 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now