SQL FileStream Setup

Configuration of the Filestream Feature in FireStart

As storing a large number of files in a database requires a lot of resources, FireStart has unlinked the file storage from the main database storage so that a less performant SQL Server can be used for the Filestream storage. The usage of Filestream storage is obligatory.

FireStart configuration:

sql-filestream-setup-2019-08-22-1

Parameter Description

  • Source: Name of the SQL Server instance
  • Catalog: Name of the database which manages the files. Has to differ from the one used for FireStart. 
  • FileStream-Path: Is the path where the files should be dropped by the SQL Server. It must refer to a local disk because network locations are NOT supported by the SQL Server. 
  • SQL Authentication: Determines whether SQL Authentication or Windows Authentication should be used. We strongly recommend you only use Windows Authentication.

Activation of the Microsoft SQL FileStream Functionality for Document Management in FireStart

Activation on the level of the SQL Server instance

For that, you first need to open the SQL Server Configuration Manager. Then select SQL Server Services and choose the SQL Server instance you want to activate the FileStreams on. Right-click the Server instance and select Properties, and under FILESTREAM you now configure it as follows (the name is without relevance):

sql-filestream-setup-2017-10-18-3

Since Windows 10, the SQL Server Configuration Manager has been included in Computer Management. 

sql-filestream-setup-2017-10-18-1

Establish FileStream-Access Level 

This can be done in 2 ways, which will be explained as follows:

  • Execute a SQL Query, which contains those 2 lines
    • EXEC sp_configure filestream_access_level, 2
    • RECONFIGURE
  • Use the Microsoft SQL Server Management Studio: navigate to the SQL Server instance\Properties\Advanced\FileStream Access Level and set Full access enabled

sql-filestream-setup-2017-10-18-2-1

 

Note: For FileStreams to work correctly, the FireStart server must have access to the SQL Server via TCP ports 139 and 445.

FileStream DB with SQL Cluster

If you use a SQL Cluster, the FileStream Feature has to be activated on every single node in the SQL Configuration Manager. The FileStream directory needs to be installed on a shared disk. 

For further information, please have a look at the Microsoft Documentation.

Move File DB

There are several possibilities to move the File DB. For detaile information, see Microsoft.

Probably the easiest one is doing a backup and restore:

  • Stop the FireStart Server
  • Backup the FireStartFileDB
  • Restore FireStartFileDB with the new path under Files/FILESTREAM Data and tick the WITH_REPLACE checkbox. sql-filestream-setup-2018-03-21-3sql-filestream-setup-2018-03-21-1-1
 
  • Replace the old path with the new one in the Configuration Wizard.sql-filestream-setup-2018-03-21-2-1
 
  • Start the FireStart Server again.

Troubleshooting:

When you are adding a file to a FILESTREAM filegroup or a memory-optimized filegroup, or when you add additional transaction log files to a database while using SQL Server 2022 (16.x) RTM, you may encounter an error message “Error 35221” or “Filestream is not enabled.”

A fix for this issue will be released in Cumulative Update 1 for SQL Server 2022 (16.x).

To work around this issue, you can use Trace Flag 12324 as either startup trace flag, or at the session level.

To fix the issue, open SQL Server Configuration Manager > SQL Server Services and right-click SQL Server. In the Properties window, open the Startup Parameters tab and enter ‘-T3226’.

FILESTREAM