Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ferrethouse
Constraint Violating Yak Guru
352 Posts |
Posted - 2012-05-12 : 00:24:36
|
Currently I have to go through one by one and look at the storage properties. Is there a query that will list all the indexes and which data file they are using? |
|
influent
Constraint Violating Yak Guru
367 Posts |
Posted - 2012-05-16 : 20:11:11
|
select 'table_name'=object_name(i.id) ,i.indid,'index_name'=i.name ,i.groupid,'filegroup'=f.name ,'file_name'=d.physical_name,'dataspace'=s.name from sys.sysindexes i,sys.filegroups f ,sys.database_files d,sys.data_spaces swhere f.data_space_id = i.groupidand f.data_space_id = d.data_space_idand f.data_space_id = s.data_space_id |
|
|
ferrethouse
Constraint Violating Yak Guru
352 Posts |
Posted - 2012-05-21 : 11:29:29
|
Thank you. That is perfect. |
|
|
|
|
|