We have a database and have decided to enable it for FileStream use. I think I've done everything I'm supposed to except creating a FileStream Data Container. I can't seem to find a way to do this in SSMS 2008 on our existing database. Can this only be done at the time a database is created?
Enabling FILESTREAMRight-click the instance, and then click Properties. In the SQL Server Properties dialog box, click the FILESTREAM tab. Select the Enable FILESTREAM for Transact-SQL access check box. If you want to read and write FILESTREAM data from Windows, click Enable FILESTREAM for file I/O streaming access.
1 Answer. Show activity on this post. If you encounter an error message "A table that has FILESTREAM columns must have a nonnull unique column with the ROWGUIDCOL property." you can add this property to a column with the following T-SQL statement: ALTER TABLE <TableName> ALTER COLUMN <IdColumnName> ADD ROWGUIDCOL .
To use FILESTREAM, you must create or modify a database to contain a special type of filegroup. Then, create or modify a table so that it contains a varbinary(max) column with the FILESTREAM attribute. After you complete these tasks, you can use Transact-SQL and Win32 to manage the FILESTREAM data.
Click on 'Add FileGroup' in the FILESTREAM section and specify the name of the SQL Server FILESTREAM filegroup. Click 'OK' to create the database with this new filegroup. Once the database is created, open the database properties to add the file in the newly created 'DemoFileStream' filegroup.
To add FS support to existing database just create a new filegroup, then add the fs file;
alter database YourDatabase add filegroup fsGroup contains filestream; go alter database YourDatabase add file ( NAME = 'fsYourDatabase', FILENAME = 'c:\<your_file_path>' ) to filegroup fsGroup; go
More here: BOL Link
And definitely read everything Paul Randal has written about filestream: link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With