Enabling the Filestream

<< Click to Display Table of Contents >>

Navigation:  ProcessRobot > Installation Guide >

Enabling the Filestream

To enable the Filestream, please follow the procedure described below.

 

1.        Navigate to ‪C:\Windows\SysWOW64 and run SQLServerManager13.msc.

 

2.        Right Click on the SQL Server which is currently running, and open the service properties.

 

 

3.        In the Properties page, select the “FILESTREAM” tab and enable the FILESTREAM for Transact-SQL access, I/O access and allow remote clients to access the FILESTREAM data.

 

 

4.        Next, navigate to the SQL Server Management Studio and execute the following query.

 

EXEC sp_configure filestream_access_level, 2  

RECONFIGURE  

 

5.        Once the query completes successfully, restart the SQL Server Service and then navigate to the SQL Server Management Studio and open the properties of the Database.

 

 

 

In the Properties, navigate to the “Filegroups” page, click on the “Add FileGroup” option under “FILESTREAM” and set the Name of your preference, tick the default option and click the OK button.

 

6.        Next, navigate to the Properties “files” page, click on the “Add” Button. In the new entry that has been created, set the name of your preference, the File Type as “FILESREAM Data” and under the “Path” column, set the directory under which the screenshots should be saved.

 

 

7.        As a final step, execute the query below (The Query can be also found here).

 

sp_rename 'logs_screenshots.screenshot_bytes', 'screenshot_bytes2' , 'COLUMN'

GO

 

ALTER TABLE logs_screenshots ALTER COLUMN id ADD ROWGUIDCOL

GO

 

ALTER TABLE logs_screenshots ADD screenshot_bytes varbinary(max) FILESTREAM NULL

GO

 

UPDATE logs_screenshots

SET screenshot_bytes = screenshot_bytes2

GO

 

ALTER TABLE logs_screenshots

DROP COLUMN screenshot_bytes2

GO

 

 

Note: To disable the FileStream, run the below query (The Query can be also found here).

 

sp_rename 'logs_screenshots.screenshot_bytes', 'screenshot_bytes2' , 'COLUMN'
GO

 
ALTER TABLE logs_screenshots ADD screenshot_bytes varbinary(max) NULL
GO

 
UPDATE logs_screenshots
SET screenshot_bytes = screenshot_bytes2
GO

 
ALTER TABLE logs_screenshots
DROP COLUMN screenshot_bytes2
GO

 
ALTER TABLE logs_screenshots ALTER COLUMN id DROP ROWGUIDCOL
GO