如何将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