我正在嘗試複製Visual Studio SQL數據庫項目的預部署腳本中的文件。SQL Server數據庫項目:爲什麼命令執行不受支持
:!!copy $(DataFileDirectory)\data.csv $(DataDestinationDirectory)
我發現,這所產生的錯誤:
SQL72007: The syntax check failed 'Incorrect syntax near .' in the batch near: ':!!copy
於是,我就簡化了我的測試,並試圖:
:!! dir
這也失敗:
SQL72007: The syntax check failed 'Incorrect syntax near .' in the batch near: ':!! dir
當我嘗試時失敗:
!! dir
我能夠像執行命令:
:r .\myfile.sql
我注意到,每當我做:!!
出現以下錯誤,
72006: Fatal scripting error: Command Execute is not supported.
爲什麼命令執行(:!!
)不支持? !