filegroupe

  • i want to see all of my tables'filegroupe?what script ?i have 1000 tables and i want to see together my tables name and thats filegroupe?

  • Hi..Pls try this

    I have this query:

    select sys.tables.name,sys.data_spaces.name

    from sys.tables,sys.data_spaces

    where sys.tables.lob_data_space_id = sys.data_spaces.data_space_id

    order by sys.tables.name

  • thanks , but that show all of tables "primary" and it is not true.what am i doing???

  • You may find this script useful.

    select

    db_name()as DBName,

    object_name(i.id) as TableName,

    fg.groupname as FileGroup

    from sysfilegroups fg, sysindexes i

    and i.indid < 2

    and i.groupid = fg.groupid

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

Viewing 4 posts - 1 through 3 (of 3 total)

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