- right-click on your server in SSMS's object manager and pick "Properties" then "Advanced" from the dialog which appears and set "FILESTREAM Access Level" under "FILESTREAM" to "Transact-SQL access enabled"
- open "SQL Server Configuration Manager" and click on "SQL Server Services" at the left and at the right right-click on "SQL Server (MSSQLSERVER)" and pick "Properties" and then the "FILESTREAM" tab where you should check the checkbox for "Enable FILESTREAM for Transact-SQL access"
- open services and restart "SQL Server (MSSQLSERVER)"
- you're gonna need some SQL like this...
USE [master]
GO
ALTER DATABASE [Foo] ADD FILEGROUP [Files]
CONTAINS FILESTREAM
GO
ALTER DATABASE [Foo] ADD FILE (Name='Nice_Files',
FILENAME=N'E:\whatever\Nice_Files') TO FILEGROUP [Files]
GO
Addendum: @jdgonzalez mentions: @jaeschke one clarification. The file you list is actually a folder.
No comments:
Post a Comment