Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Create DB for filestream failes

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2009-09-09 : 03:30:53
i am tryng to create a Db from this article :
http://www.databasejournal.com/features/mssql/article.php/3802241/Working-with-FILESTREAM-using-VB-NET.htm?comment=16043-0
when i try to creatre the db :

CREATE DATABASE testDB
ON
PRIMARY ( NAME = testDB_data,
FILENAME = 'D:\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\testDB_data.mdf'),
FILEGROUP TestFileStreamGroup CONTAINS FILESTREAM ( NAME = testDB_fs,
FILENAME = 'D:\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\filestream')
LOG ON ( NAME = testDB_log,
FILENAME = 'D:\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\testDB_log.ldf')
GO

(after i change the path and give file stream permissions with :
EXEC sp_configure filestream_access_level, 2)
i get this error :
quote:

Msg 5123, Level 16, State 2, Line 1
CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 1815) while attempting to open or create the physical file 'd:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\filestream1'.


i gave all permissions to the folder but no luck
Thanks in advance
Peleg

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2009-09-09 : 04:55:44
SOLVED!
quote:

Check the service account for SQL Server. There is a known issue where
using NetworkService as the service accounts does not work with Filestream.
Use a regular user account for the service account and you should be fine.

Use SQL Server Configuration Manager to change this.



Thnaks to :
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Go to Top of Page
   

- Advertisement -