Solution: system. Data. sqlclient. sqlerror: The filestream function is disabled)

Source: Internet
Author: User

When restoring the adventureworks sample database, the filestream feature is disabled error message is displayed.

Filestream is a new feature added by SQL Server 2008. It is disabled by default. If this feature is enabled for the DB Backup file, enable this feature is also required for restoration on another server.

To open the SQL Server Configuration Manager at the beginning, follow these steps:
1> enable SQL Server Configuration Manager
2> Find SQL Server services
3> switch to filestream tabe.
4> select [enable filestream for Transact-SQL access] and [enable filestream for file I/O streaming access]
4> Click OK to restart SQL Server services

As follows:

It does not work. The error persists during restoration.

I checked books-online. The original configuration was used to control access, and it was just a poor response.

The correct setting method is to call the sp_configure stored procedure to enable filestream.

CodeAs follows:

1
2
3
4
5
UseMaster
Go

ExecSp_configure filestream_access_level, 2
Reconfigure

Restore the database, it works!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.