Checking data distribution on devices with sp_helpsegment

At times, the number of data pages in a partition can be balanced, while the number of data pages on the devices in a segment becomes unbalanced.

You can check the free space on devices with sp_helpsegment. This portion of the sp_helpsegment report for the same table shown in the sp_helpartition example above shows that the distribution of pages on the devices remains balanced:

device                 size            free_pages  
---------------------- --------------- ----------- 
pubtune_detail01       15.0MB          4480  
pubtune_detail02       15.0MB          4872  
pubtune_detail03       15.0MB          4760  
pubtune_detail04       15.0MB          4864  
pubtune_detail05       15.0MB          4696  
pubtune_detail06       15.0MB          4752  
pubtune_detail07       15.0MB          4752  
pubtune_detail08       15.0MB          4816  
pubtune_detail09       15.0MB          4928