Questions tagged [sqlfilestream]

SqlFileStream is a class that exposes SQL Server data that is stored with the FILESTREAM column attribute as a sequence of bytes.

The SqlFileStream class is used to work with varbinary(max) data stored with the FILESTREAM attribute in a SQL Server 2008 database. You must install the .NET Framework 3.5 SP1 (or later) to use System.Data.SqlTypes.SqlFileStream to work with FILESTREAM data.

Specifying the FILESTREAM attribute on a varbinary(max) column causes SQL Server to store the data in the local NTFS file system instead of in the database file. Transact-SQL statements provide data manipulation capabilities within the server, and Win32 file system interfaces provide streaming access to the data.

MSDN doc

102 questions
1
vote
2 answers

Red Gate SQL CI Build Error: FILESTREAM filegroup is not available in database

TL;DR Does SQLCI support FILESTREAM? I get the error Synchronization of 'Scripts.state' and ... failed: Default FILESTREAM filegroup is not available in database when trying to run a Red Gate SQL CI Build step in TeamCity against my database which…
Andy Joiner
  • 5,932
  • 3
  • 45
  • 72
1
vote
0 answers

Deleting already duplicated Filestream Files

I have three FileStreams (FS1 on F drive, FS2 on H drive, FS3 on E drive) belonging to the same FileStream group of one particular database (DB) which is in Simple recovery mode in the SQL Server 2012. FS1 contains huge number of files due to which…
1
vote
0 answers

SQL Server FileTable weird behavior in cluster environment

We have enabled the Filetable feature in our SQL Server Cluster environment. Whenever one node fails, SQL Server automatically fails over to a different node but the Filetable is not getting enabled automatically, users have to go to cluster…
user145610
  • 2,949
  • 4
  • 43
  • 75
1
vote
0 answers

Controlling file extension when inserting data into SQL Filestream column?

I have a SQL Server Express database with a 10gig limit, so I'm trying to save space by moving a big text column over to a FileStream type. I created a new database, set up FileStreaming as well as the FileStream column and set it up as a full text…
Greg
  • 77
  • 1
  • 8
1
vote
0 answers

Permissions on SQL Server FILESTREAM

Now I've got a question for you. I'm running a ASP.NET REST Web API using OWIN running as a windows service. Now I've got SQL Server running on a different host, containing a table with binary data and FILESTREAM enabled. I want to pass this binary…
nikneem
  • 23
  • 6
1
vote
1 answer

Storing documents in database ASP.NET MVC5 with EF6 - code-first

I am currently working on a project that needs to store about 5x2mb files for each user in the system. There will eventually be tens of thousands of users. I'm using ASP.NET MVC5, EF6 code-first. I've read about using Filestream, so that I don't…
1
vote
0 answers

Unexpectedly deleted SQL File Stream Shared location

I unexpected delete SQL File Stream Shared location, is there a way to restore the Shared location. When i try to open SQL File table from SSMS Explore File Table Directory it works on Server, but it doesn't allow to open from client machine. I…
user145610
  • 2,949
  • 4
  • 43
  • 75
1
vote
1 answer

Moving Database that uses filestream

I have enabled filestream, and I create a database in SQL server management studio with a filegroup/filestream. I want to use the resulting database in visual studio, so I copy over the 2 files (mdf & ldf) and the filestream folder to App_Data. I…
Bob Coder
  • 391
  • 3
  • 13
1
vote
1 answer

How to insert a file under a directory in SQL Filetable

I created a directory in File Table. Now I need to insert files inside that directory. As parent_path_locator can not be set, I can't think of how to achieve this. I am doing all these in code. This is how i created directory; Dim insertDir =…
voddy
  • 950
  • 1
  • 11
  • 21
1
vote
0 answers

Tracking FileStream data with Change Data Capture

I need a database that manages documents with transaction support and can restore the state of a row and the corresponding document to an earlier point in time. I am leaning towards using the SQL Server FileStream feature because it seems to fit…
magnattic
  • 12,638
  • 13
  • 62
  • 115
1
vote
1 answer

SqlFileStream append new data create new file

I sending file to SqlFileStream in parts. Like this: public void StreamFile(int storageId, Stream stream) { var select = string.Format( @"Select TOP(1) Content.PathName(), GET_FILESTREAM_TRANSACTION_CONTEXT()…
estradowiec
  • 241
  • 1
  • 4
  • 15
1
vote
0 answers

sql server filestream folder count not matching table count, caused by duplicates?

I have a table (myTable) in which I have a field flagged as being a Filestream, on this server it is the only filestream and it saves to the filestream location of F:\foo SELECT COUNT(1) FROM myTable results in 37,314 but the folder properties of…
Seph
  • 8,472
  • 10
  • 63
  • 94
1
vote
4 answers

How to disable Filestream on SQL Server 2008 R2 to enable mirroring?

I'm enabling database mirroring on SQL Server 2008 R2, I've already configured my servers but when trying to start mirroring I get the following error: TITLE: Database Properties ------------------------------ An error occurred while starting…
Daniel Martinez
  • 397
  • 4
  • 20
0
votes
0 answers

Robust SQL for copying large amount of data between columns

I'm working with a database that stores files as ordinary varbinary(max) type columns. I want to change the table to use FILESTREAM instead. I need to write a script to create the new FILESTREAM column and copy over the old data into it. This will…
Valuator
  • 3,262
  • 2
  • 29
  • 53
0
votes
0 answers

Table attribute with FluentMigrator C#

I am trying to create a table that contains a VARBINARY(MAX) column with the FILESTREAM attribute. I don't know how to achieve that. Can you please help. Documentation Pages You've Read So Far Microsoft…
Sherif
  • 1,249
  • 4
  • 15
  • 38