sql server数据库菜鸟问题,哪里错了,运行说“FILEGROUP”附近有语法错误。 80
CREATEDATABASELibraryONPRIMARY(NAME=Library,FILENAME='C:\SQL\教务管理数据\Library.mdf',SIZE...
CREATE DATABASE Library
ON PRIMARY
(
NAME=Library,
FILENAME='C:\SQL\教务管理数据\Library.mdf',
SIZE=5,
MAXSIZE=20GB,
FILEGROWTH=10%
)
FILEGROUP FG
(NAME=Library1,
FILENAME='C:\SQL\教务管理数据\Library1.ndf',
SIZE=1,
MAXSIZE=UNLIMITED,
FILEGROWTH=1MB)
LOG ON
(NAME=Library_log,
FILENAME='C:\SQL\教务管理日志\Library_log.ldf',
SIZE=1,
MAXSIZE=600,
FILEGROWTH=10%
)
----------------------------------------------------------
运行说“FILEGROUP”附近有语法错误。 展开
ON PRIMARY
(
NAME=Library,
FILENAME='C:\SQL\教务管理数据\Library.mdf',
SIZE=5,
MAXSIZE=20GB,
FILEGROWTH=10%
)
FILEGROUP FG
(NAME=Library1,
FILENAME='C:\SQL\教务管理数据\Library1.ndf',
SIZE=1,
MAXSIZE=UNLIMITED,
FILEGROWTH=1MB)
LOG ON
(NAME=Library_log,
FILENAME='C:\SQL\教务管理日志\Library_log.ldf',
SIZE=1,
MAXSIZE=600,
FILEGROWTH=10%
)
----------------------------------------------------------
运行说“FILEGROUP”附近有语法错误。 展开
1个回答
2015-10-21
展开全部
少逗号了。
参考示例:
CREATE DATABASE Sales
ON PRIMARY
( NAME = SPri1_dat,
FILENAME = 'D:\SalesData\SPri1dat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 15% ),
( NAME = SPri2_dat,
FILENAME = 'D:\SalesData\SPri2dt.ndf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 15% ),
FILEGROUP SalesGroup1
( NAME = SGrp1Fi1_dat,
FILENAME = 'D:\SalesData\SG1Fi1dt.ndf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 ),
( NAME = SGrp1Fi2_dat,
FILENAME = 'D:\SalesData\SG1Fi2dt.ndf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 ),
FILEGROUP SalesGroup2
( NAME = SGrp2Fi1_dat,
FILENAME = 'D:\SalesData\SG2Fi1dt.ndf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 ),
( NAME = SGrp2Fi2_dat,
FILENAME = 'D:\SalesData\SG2Fi2dt.ndf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = Sales_log,
FILENAME = 'E:\SalesLog\salelog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB ) ;
GO
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询