Search code examples
sql-serverfileindexingfilegroup

How to create indexs on a different file of Filegroup


i'm using sqlserver 2008 R2

is there any way to specify that a table index is created on a sencondary file from a filegroup?

example:

"Primay" Filegroup has 2 files: Catalog.mdf and Indexes.ndf

how can i specify that my new index is created on the sencond file "Indexes.ndf" of "Primary" filegroup?


Solution

  • Indexes are created at the filegroup level. You can't get so granular as to specify a file within a filegroup. Sounds like you really should have made indexes.ndf a separate filegroup itself.