>I have a command line like this to create a filegroup:
>
>
> IF NOT EXISTS (SELECT * FROM sys.filegroups WHERE Name='MyFilegroup')
> ALTER DATABASE MyDatabase ADD FILEGROUP MyFilegroup
> CREATE INDEX [MyIndex] ON ... ON [Myfilegroup]
>
>
>However, I get this message:
>
>The filegroup "Myfilegroup" has no files assigned to it.
>
>So, I need to add an entry in the database property sheet in the Files section. Is there a way to verify for that and script that as well?
This link
http://www.mssqltips.com/tip.asp?tip=1112 seems to address the issue of adding files to FILEGROUP.
If it's not broken, fix it until it is.
My Blog