當您嘗試建立 FileTable 時,遇到【FileTable objects require the FILESTREAM database option DIRECTORY_NAME to be non-NULL】的錯誤訊息,該如何排除?

本文將介紹當您嘗試建立 FileTable 時,遇到【FileTable objects require the FILESTREAM database option DIRECTORY_NAME to be non-NULL】的錯誤訊息,可能的解決方案。

當您嘗試於 SQL Server 2012 建立 FileTable 時,遇到如下的錯誤訊息:

 

   1:  Msg 33414, Level 16, State 1, Line 1
   2:  FileTable objects require the FILESTREAM database option DIRECTORY_NAME to be non-NULL. 
   3:  To create a FileTable in the database 'FTDB', set the DIRECTORY_NAME option to a non-NULL value using ALTER DATABASE. 
   4:  Or, to set the DIRECTORY_NAME option to NULL, in the database 'FTDB' disable or drop the existing FileTables.

 

發生這個問題的原因是未設定資料庫層級的目錄名稱,只要依照下圖的步驟設定 FILESTREAM Directory Name 即可。

 

image

 

【參考資料】