I want to know if there is way to determine the fragmentation of data files on sql server? If there is a way , then how do we defragment them is they are above certain threshold. I know about index fragmentation and all, we have processes to rebuild indexes.