July 16, 2010 at 3:07 am
Is there any way to know in which datafile in any table lies ?
For example.. if i create a table and if i execute sp_help 'table name' it will give only in which FILEGROUP the table belongs but it will not give that in which physical data file ( mdf or ndf) that table is created.
Is there any way to find it out ?
July 16, 2010 at 3:54 am
The objects will usually be split between the files due to the proportional fill that sql uses. However to answer your question you could use dbcc ind.
example usage
dbcc ind('adventureworks','sales.salesorderheader',1)
It returns a list of all pages for the object you provide. The first column returned PageFID is the File ID the page resides on. If you are really interested you could then take the output for dbcc ind and determine how much space in each file is taken by the object.
-Jeremy
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply