Sql-Server
用於多個數據文件的自動增長的 T-SQL
我似乎無法弄清楚我的腳本改變 SQL Server 2008 數據庫和文件增長的問題。有兩個數據文件和一個日誌文件,都需要開啟 Autogrowth。這看起來完全錯誤嗎?謝謝!
USE MASTER GO ALTER DATABASE BigDB MODIFY FILE ( NAME = BIGDBPPE, FILENAME = "H:\MSSQL\Data\BigDB.mdf", MAXSIZE = UNLIMITED, FILEGROWTH = 2000MB) USE MASTER GO ALTER DATABASE BigDB MODIFY FILE ( NAME = BIGDBPPE1, FILENAME = "K:\MSSQL\Data\BigDB_data1.ndf", MAXSIZE = UNLIMITED, FILEGROWTH = 2000MB) USE MASTER GO ALTER DATABASE BigDB MODIFY FILE ( NAME = BIGDBPPE_log, FILENAME = "O:\MSSQL\Data\BigDB_log.ldf", MAXSIZE = UNLIMITED, FILEGROWTH = 200MB) GO
語法看起來不錯,確保數據庫名稱不需要
$$ square-bracketed $$並且邏輯名稱匹配。