We are going to start using the sql 2008 filestream and going through the instruction setting it up. One of the items that we do is have everything in a single sql script that can be run multiple times without corrupting the data or executing unnecessary steps.
So far have created the file stream group and now want to define the filestream data container with the following statement
ALTER DATABASE Production ADD FILE (
NAME = FSGroup1File,
FILENAME = 'F:\Production\FSDATA')
TO FILEGROUP FileStreamGroup1;
GO
Is there any way that I can check to see if this has already been done?
i.e.
if (select COUNT(*) from sys.????? where name = '?????')=0
ALTER DATABASE Production ADD FILE (
NAME = FSGroup1File,
FILENAME = 'F:\Production\FSDATA')
TO FILEGROUP FileStreamGroup1;
GO
Sorry if this is a basic question but am bit of a novice when it comes to DB.
Thanks.
Best Answer
Edit: Corrected view name to match suggestion by Nick Kavadias.