TimHudspith
asked on
Filestream index randomly changing filegroup
I have a table with a filestream column holding about 2000 photographs. When I created it I set the primary key to the unique identifier column (probably an unnecessary step). I checked table properties and it was assigned to the filestream filegroup. Everything OK for a couple of weeks, repopulating the table many times without incident. Just now I have discovered that the index has moved itself from the filestream filegroup to the default secondary (user data) filegroup. After repopulating the table I got the message:
By way of confirmation I checked the table's filegroup in table properties and queried sys.filegroups/sys.indexes , and it has indeed moved. I've now dropped the primary key on this table (there are no other indexes), but am still stuck with this table being in the wrong filegroup. The only thing that changed recently was that I added a new varchar column to the table, not indexed. Can this really be responsible for filegroup changing?
Could not allocate space for object 'dbo.T_AllPhotos' in database 'myDB' because the 'FG_UserData' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
By way of confirmation I checked the table's filegroup in table properties and queried sys.filegroups/sys.indexes
create a clustered index on the filestream filegroup.
ASKER
Can you guide me on the synatax? The following gives me the error 'invalid filegroup specified'.
CREATE UNIQUE CLUSTERED INDEX ux_AllPhotos_Filename
ON dbo.T_AllPhotos(Filename)
ON [FG_Filestream]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.