Table to Datafile mapping

  • Is there a way to find out which datafile each table resides on? Thanks in advance for your help.

  • SELECT sf.groupid AS GroupID, substring(sf.groupname,1,30) AS FilegroupName,

    substring(so.name,1,30) AS ObjectName

    FROM sysobjects so

    INNER JOIN sysindexes si ON so.id = si.id

    INNER JOIN sysfilegroups sf ON si.groupid = sf.groupid

    WHERE si.indid = 0 and so.xtype = 'U'

    ORDER BY sf.groupname, so.ObjectName

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply