I have 3 data files for the Primary filegroup of a database in SQL Server 2005. Is it possible to determine which data file a particular index resides on, or do they live in more than one datafile within the filegroup?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Objects such as tabkes and indexes are built on a filegroup, not a file. The index wiLl most likely reside in all fiLes within the file group. There are a few outlying cases where this is not true, such as if more files have been added, causing a file allocation hotspot, etc, but SQL Server uses a proportional fill algorithm for the files, and fills them evenly.
You can see for sure by running
Where 2 is the indexID of the index you are interested in.
This will show you the fileID of each page