SQL Server - 将FileTable目录设置为“C:\ Example”

时间:2017-04-17 20:21:31

标签: sql-server directory filetable

如何将FileTable_Directory设置为自定义路径,例如C:\Example?我可以按需更改此目录吗?它会反映数据库中更新时的更改吗?这是我的FileTable设置:

-- Enable Filestream
EXEC sp_configure filestream_access_level, 2
RECONFIGURE
GO
-- Create Database
CREATE DATABASE FileTableDB
ON PRIMARY
(Name = FileTableDB,
FILENAME = 'C:\FileTable\FTDB.mdf'),
FILEGROUP FTFG CONTAINS FILESTREAM
(NAME = FileTableFS,
FILENAME='C:\FileTable\FS')
LOG ON
(Name = FileTableDBLog,
FILENAME = 'C:\FileTable\FTDBLog.ldf')
WITH FILESTREAM (NON_TRANSACTED_ACCESS = FULL,
DIRECTORY_NAME = N'FileTableDB');
GO

USE FileTableDB
GO
CREATE TABLE FileTableTb AS FileTable
WITH
(FileTable_Directory = 'FileTableTb_Dir');
GO

0 个答案:

没有答案