Solved

list compress tables

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

860 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