December 29, 2010 at 11:24 pm
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?
December 29, 2010 at 11:31 pm
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
December 30, 2010 at 12:00 am
thanks , but that show all of tables "primary" and it is not true.what am i doing???
December 30, 2010 at 1:44 am
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