top of page

SQL Server List all Partitioned tables

  • Writer: Kunal Ranpura
    Kunal Ranpura
  • Jan 13, 2020
  • 1 min read

Find list of all the partitioned tables in sql server.

use userdb_name

go

select distinct t.name

from sys.partitions p

inner join sys.tables t

on p.object_id = t.object_id

where p.partition_number <> 1

--and t.name ='Customer'

Find if the customer table is partitioned or not

use userdb_name

go

select distinct t.name

from sys.partitions p

inner join sys.tables t

on p.object_id = t.object_id

where p.partition_number <> 1

and t.name ='Customer'


 
 
 

Recent Posts

See All
SQL Server Profiler Trace

--Import multiple trace file in sql Table. --All the rollover files will be automatically imported --provide number tracefile to capture...

 
 
 

Comments


bottom of page