消息 153,级别 15,状态 1,第 14 行 在 CREATE/ALTER DATABASE 语句中选项 FILEGOWTH 的用法无效。
CREATE DATABASE Exercise_db4/*创建主文件组*/
ON
PRIMARY
(NAME=Exe4_1_dat,
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\Exe4_F1dat.MDF',
SIZE=10,
MAXSIZE=Unlimited,
FILEGROWTH=10%),
(NAME=Exe4_2_dat,
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\Exe4_F2dat.NDF',
SIZE=15,
MAXSIZE=50MB,
FILEGOWTH=1),
/*创建文件组*/
FILEGROUP Exe4_Group1
(NAME=E4_G1_F1_dat,
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\Exe4_G1F1dat.NDF',
SIZE=10,
MAXSIZE=Unlimited,
FILEGROWTH=15%),
(NAME=E4_G1_F2_dat,
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\Exe4_G1F2dat.NDF',
SIZE=10,
MAXSIZE=Unlimited,
FILEGROWTH=3)
/*创建事务日志文件*/
LOG ON
(NAME=Exe4_LOG,
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\Exe4log.LDF',
SIZE=5,
MAXSIZE=35,
FILEGROWTH=5)