Događaj
31. ožu 23 - 2. tra 23
Najveći događaj učenja SQL-a, Fabrica i Power BI-ja. 31. ožujka – 2. travnja. Upotrijebite kod FABINSIDER da uštedite 400 USD.
Registrirajte se već danasOvaj preglednik više nije podržan.
Prijeđite na Microsoft Edge, gdje vas čekaju najnovije značajke, sigurnosna ažuriranja i tehnička podrška.
Applies to:
SQL Server
Before you can start to use FILESTREAM, you must enable FILESTREAM on the instance of the SQL Server Database Engine. This topic describes how to enable FILESTREAM by using SQL Server Configuration Manager.
On the Start menu, navigate to All Programs > SQL Server > Configuration Tools, and then select SQL Server Configuration Manager.
Napomena
On newer versions of Windows, follow these instructions to open SQL Server Configuration Manager.
In the list of services, right-click SQL Server Services, and then select Open.
In the SQL Server Configuration Manager snap-in, locate the instance of SQL Server on which you want to enable FILESTREAM.
Right-click the instance, and then select Properties.
In the SQL Server Properties dialog box, select the FILESTREAM tab.
Select the Enable FILESTREAM for Transact-SQL access check box.
If you want to read and write FILESTREAM data from Windows, select Enable FILESTREAM for file I/O streaming access. Enter the name of the Windows share in the Windows Share Name box.
If remote clients must access the FILESTREAM data that is stored on this share, select Allow remote clients to have streaming access to FILESTREAM data.
Select Apply.
In SQL Server Management Studio, select New Query to display the Query Editor.
In Query Editor, enter the following Transact-SQL code:
EXEC sp_configure filestream_access_level, 2;
RECONFIGURE;
Select Execute.
Restart the SQL Server service.
When you set up FILESTREAM storage volumes, consider the following guidelines:
Turn off short file names on FILESTREAM computer systems. Short file names take significantly longer to create. To disable short file names, use the Windows fsutil utility.
Regularly defragment FILESTREAM computer systems using magnetic storage.
Use 64-KB NTFS clusters. Compressed volumes must be set to 4-KB NTFS clusters.
Disable indexing on FILESTREAM volumes and set disablelastaccess
. To set disablelastaccess
, use the Windows fsutil utility.
Disable antivirus scanning of FILESTREAM volumes when it's not necessary. If antivirus scanning is necessary, avoid setting policies that will automatically delete offending files.
Set up and tune the RAID level for fault tolerance and the performance that is required by an application.
RAID level | Write performance | Read performance | Fault tolerance | Remarks |
---|---|---|---|---|
RAID 5 | Normal | Normal | Excellent | Performance is better than one disk or JBOD; and less than RAID 0 or RAID 5 with striping. |
RAID 0 | Excellent | Excellent | None | |
RAID 5 + striping | Excellent | Excellent | Excellent | Most expensive option. |
When you design a FILESTREAM database, consider the following guidelines:
FILESTREAM columns must be accompanied by a corresponding uniqueidentifier ROWGUID column. These kinds of tables must also be accompanied by a unique index. Typically this index isn't a clustered index. If the databases business logic requires a clustered index, you have to make sure that the values stored in the index aren't random. Random values will cause the index to be reordered every time that a row is added or removed from the table.
For performance reasons, FILESTREAM filegroups and containers should reside on volumes other than the operating system, SQL Server database, SQL Server log, tempdb
, or paging file.
Space management and policies aren't directly supported by FILESTREAM. However, you can manage space and apply policies indirectly by assigning each FILESTREAM filegroup to a separate volume and using the volume's management features.
Događaj
31. ožu 23 - 2. tra 23
Najveći događaj učenja SQL-a, Fabrica i Power BI-ja. 31. ožujka – 2. travnja. Upotrijebite kod FABINSIDER da uštedite 400 USD.
Registrirajte se već danasObuka
Certifikacija
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Dokumentacija
Configure a Firewall for FILESTREAM Access - SQL Server
Use FILESTREAM in a firewall-protected environment by opening the Windows file-sharing ports 139 and 445 to configure the firewall for FILESTREAM access.
Create a FILESTREAM-Enabled Database - SQL Server
Configure a database to support FILESTREAM by using the CONTAINS FILESTREAM clause when you create or alter the database.
Move a FILESTREAM-enabled database - SQL Server
Discover how to move a FILESTREAM-enabled database. See which Transact-SQL scripts to use in the Query Editor of SQL Server Management Studio.