CREATE DATABASE Sales
 ON
 PRIMARY
 (NAME = SPri1_dat,
     FILENAME = 'D:\SQLDB\SPri1dat.mdf',
     SIZE ,
     MAXSIZE ,
     FILEGROWTH %),
 (NAME = SPri2_dat,
     FILENAME = 'D:\SQLDB\SPri2dt.ndf',
     SIZE ,
     MAXSIZE ,
     FILEGROWTH %),
 FILEGROUP SalesGroup1
 (NAME = SGrp1Fi1_dat,
     FILENAME = 'D:\SQLDB\SG1Fi1dt.ndf',
     SIZE ,
     MAXSIZE ,
     FILEGROWTH ),
 (NAME = SGrp1Fi2_dat,
     FILENAME = 'D:\SQLDB\SG1Fi2dt.ndf',
     SIZE ,
     MAXSIZE ,
     FILEGROWTH ),
 FILEGROUP SalesGroup2
 (NAME = SG2Fi1_dat,
     FILENAME = 'D:\SQLDB\SG2Fi1dt.ndf',
     SIZE ,
     MAXSIZE ,
     FILEGROWTH ),
 (NAME = SG2Fi2_dat,
     FILENAME = 'D:\SQLDB\SG2Fi2dt.ndf',
     SIZE ,
     MAXSIZE ,
     FILEGROWTH )
 LOG ON
 (NAME = Sales_log,
     FILENAME = 'D:\SQLDB\salelog.ldf',
     SIZE = 5MB,
     MAXSIZE = 25MB,
     FILEGROWTH = 5MB );

效果图:

创建基于文件组的数据库SQL救命语句-LMLPHP

最近在看的书《锋利的SQL》

创建基于文件组的数据库SQL救命语句-LMLPHP

05-11 13:02