I am getting an error as we have a deployment script where we enable filestream. The script it:
ALTER DATABASE MYDB
ADD FILE (NAME = [MYDB_FILES], FILENAME = 'C:\MYDBFILES') TO FILEGROUP [MYDB_FILEGROUP];
If the path already exists after a previous deploy: 'C:\MYDBFILES' then I get the error:
Cannot create file 'C:\MYDBFILES' because it already exists. Change the file path or the file name, and retry the operation.
How can I handle this? I am thinking best option is to delete the whole file folder as it is being backed up anyway. Any suggestions? On a QA server if we added a GUID etc it will have a lot of folders getting created.