|
发表于 2010-12-18 18:24:16
|
显示全部楼层
sql server 的
USE master;
go
IF DB_ID (N'NCDB') IS NOT NULL
DROP DATABASE [NCDB];
go
CREATE DATABASE [NCDB]
go
ALTER DATABASE [NCDB] ADD FILEGROUP [NNC_DATA01]
go
ALTER DATABASE [NCDB] ADD FILEGROUP [NNC_DATA02]
go
ALTER DATABASE [NCDB] ADD FILEGROUP [NNC_DATA03]
go
ALTER DATABASE [NCDB] ADD FILEGROUP [NNC_INDEX01]
go
ALTER DATABASE [NCDB] ADD FILEGROUP [NNC_INDEX02]
go
ALTER DATABASE [NCDB] ADD FILEGROUP [NNC_INDEX03]
go
ALTER DATABASE [NCDB] ADD FILE(NAME = N'nnc_data01', FILENAME = N'C:\Microsoft SQL Server\MSSQL$SQL1\data\nnc_data01_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA01]
go
ALTER DATABASE [NCDB] ADD FILE(NAME = N'nnc_data02', FILENAME = N'C:\Microsoft SQL Server\MSSQL$SQL1\data\nnc_data02_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA02]
go
ALTER DATABASE [NCDB] ADD FILE(NAME = N'nnc_data03', FILENAME = N'C:\Microsoft SQL Server\MSSQL$SQL1\data\nnc_data03_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA03]
go
ALTER DATABASE [NCDB] ADD FILE(NAME = N'nnc_index01', FILENAME = N'C:\Microsoft SQL Server\MSSQL$SQL1\data\nnc_index01_Data.NDF' , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX01]
go
ALTER DATABASE [NCDB] ADD FILE(NAME = N'nnc_index02', FILENAME = N'C:\Microsoft SQL Server\MSSQL$SQL1\data\nnc_index02_Data.NDF' , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX02]
go
ALTER DATABASE [NCDB] ADD FILE(NAME = N'nnc_index03', FILENAME = N'C:\Microsoft SQL Server\MSSQL$SQL1\data\nnc_index03_Data.NDF' , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX03]
Go |
|