alter database employees
add filegroup 檔案組1
go
add file
( name="檔案1",
filename="檔案路徑\檔案1.mdf",
size=大小MB,
maxsize=大小MB,
filegrowth=大小MB),
( name="檔案2",
filename="檔案路徑\檔案2.mdf",
filegrowth=大小MB)
to filegroup 檔案組1
add log file
(name="日誌名",
filename="檔案路徑\日誌名.ldf",
alter database employees
add filegroup 檔案組1
go
alter database employees
add file
( name="檔案1",
filename="檔案路徑\檔案1.mdf",
size=大小MB,
maxsize=大小MB,
filegrowth=大小MB),
( name="檔案2",
filename="檔案路徑\檔案2.mdf",
size=大小MB,
maxsize=大小MB,
filegrowth=大小MB)
to filegroup 檔案組1
go
alter database employees
add log file
(name="日誌名",
filename="檔案路徑\日誌名.ldf",
size=大小MB,
maxsize=大小MB,
filegrowth=大小MB)
go