0 out of 2 rated this helpful - Rate this topic

sp_filestream_configure (Transact-SQL)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Enables, changes the access level of, or disables FILESTREAM storage on an instance of SQL Server. By default, FILESTREAM storage is disabled.

Note:
FILESTREAM cannot be enabled on instances of SQL Server that are running on Windows on Windows 64 (WOW64).

Topic link icon Transact-SQL Syntax Conventions


sp_filestream_configure [ [ @enable_level = ] level ] 
    [ [ , @share_name = ] 'share_name' ] ;
@enable_level = level
  • Specifies the access level of FILESTREAM storage that you are enabling on the instance of SQL Server. level is int, and can be one of the following values:

0

Disabled. This is the default value.

1

Enabled only for Transact-SQL access.

2

Enabled only for Transact-SQL and local file system access.

3

Enabled for Transact-SQL, local file system access, and remote file system access.


@share_name = 'share_name'

Specifies the file share name that is used to access FILESTREAM values through the file system. share_name is a sysname. You can set the share_name value when you change the enabled state from 0 (disabled) or 1 (Transact-SQL only) to file system access (2 or 3).

If you want to change the share_name value when the enable level is 2 or 3, you must first set the enable level to 0 or 1. You can then change the share_name value when you reenable file system access.

If this parameter is not specified, the instance name of SQL Server is used as a default value.

0 (success) or 1 (failure)

When you run sp_filestream_configure, you might have to restart the instance of SQL Server. A computer restart is required when you enable FILESTREAM storage for the first time, or after you install any update to the RsFx driver. An instance restart is required when you disable FILESTREAM storage from an enabled state. To restart the instance of SQL Server, run the RECONFIGURE statement after you run sp_filestream_configure. To see the current FILESTREAM configuration, run the following query:

SELECT SERVERPROPERTY ('FilestreamShareName')
    ,SERVERPROPERTY ('FilestreamConfiguredLevel')
    ,SERVERPROPERTY ('FilestreamEffectiveLevel');

FilestreamConfiguredLevel shows the currently configured level of FILESTREAM access, and FilestreamEffectiveLevel shows the effective value of FILESTREAM access. These values might be different if either an instance restart or a computer restart is pending.

When FilestreamEffectiveLevel differs from FilestreamConfiguredLevel and you run sp_filestream_configure without parameters, the results contain an informational message that describes why the values are different.

Requires membership in the sysadmin fixed server role and the Windows Administrators group on the local computer.

The following example shows an instance of SQL Server (MyFilestreamSqlServerInstance) that is being enabled for remote file system access.

EXEC sp_filestream_configure 
    @enable_level = 3, 
    @share_name = "MyFilestreamSqlServerInstance";
RECONFIGURE
GO
Did you find this helpful?
(1500 characters remaining)