The advent of SQL Server FileStream is to resolve a contradiction in the storage of large objects.
How to store pictures
The first is that the method is stored in the database, which is usually done using the image field, or varbinary (max). The advantage is that you can make a unified backup, but in fact the read efficiency is low. Files that are larger than 1MB will be problematic
The second way is that the file is stored in the file system, and a path is stored in the database. In this way the database pressure is reduced, but it is not convenient for unified backup and management.
The file stream of SQL SERVER 2008 is actually the unification of the two. Files are also placed on the file system, but are managed by the database. You can unify backup and restore. FileStream is not a field type, it is defined after a field and declares the column for file flow. The column is still stored in the binary
It is generally in the database to specifically add a filegroup and one or more files to store FILESTREAM data.
Specific operation
1) Enable FileStream (file stream) on the server instance
Open SQL Server Configuration Manager, right-click on the SQL Server service, click Open, right-click on the SQL Server instance where you want to enable FileStream (file stream), select Properties from the right-click menu, Switch to the FileStream (file stream) tab, check the "Enable FileStream (file stream) or full access enabled for Transact-SQL access" option, and you can also access enable FileStream (file stream) for file I/O streams on this tab
2) Enable FileStream (file stream) for the DB instance
Executes the system stored procedure sp_configure and sets the value of the Filestream_access_level parameter to 2
EXEC sp_configure filestream_access_level, 2
GO
Valid values for the Filestream_access_level parameter include:
0 disables FileStream (file stream) on this instance, which is the default value.
1 Enable FileStream (file stream) for Transact-SQL access
2 Enable FileStream (file stream) for Transact-SQL and WIN32 stream access
After these two steps, the FileStream feature is enabled and then imported, no problem.
Sqlserver2008 FileStream solve picture storage problems