Know which tables in the Data files...

  • In SQL2000, Is there a way to find out which tables in the Data files? Especially, if you have multiple data files.

     

  • This lists database objects are in what filegroup:

    select af.name, o.name, i.name, i.dpages, i.reserved, i.used, i.rowcnt, i.rows, i.rowmodctr, i.OrigFillFactor, o.crdate, o.refdate

    from sysindexes i

    inner join sysobjects o on o.id = i.id

    inner join master..sysaltfiles af on af.dbid = DB_ID() and af.groupid = i.groupid

    order by af.name, o.name, i.indid

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

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