武汉市尔佳通讯网络工程有限公司
首页 | 联系方式 | 加入收藏 | 设为首页 | 手机站

产品目录

联系方式

联系人:业务部
电话: 00123-563069
邮箱:service@paoguangji371.com

当前位置:首页 >> 产品展示 >> 默认分类 >> 正文

sql server中filegroup与partition解析

详细信息:

--step2------------------
USE TEST
GO
--给每个文件组加个次数据文件,也就是.ndf文件
--文件命名规则:文件组名_data_流水号
ALTER DATABASE TEST
ADD FILE (
 NAME=N'FG_TEST_SalesOrderDetail_UnitPrice_1_data_1',
 FILENAME=N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\FG_TEST_SalesOrderDetail_UnitPrice_1_data_1.ndf',
 SIZE=2MB,
 FILEGROWTH=10%
 )
TO FILEGROUP FG_TEST_SalesOrderDetail_UnitPrice_1;
ALTER DATABASE TEST
ADD FILE (
 NAME=N'FG_TEST_SalesOrderDetail_UnitPrice_2_data_1',
 FILENAME=N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\FG_TEST_SalesOrderDetail_UnitPrice_2_data_1.ndf',
 SIZE=2MB,
 FILEGROWTH=10%
 )
TO FILEGROUP FG_TEST_SalesOrderDetail_UnitPrice_2;
ALTER DATABASE TEST
ADD FILE (
 NAME=N'FG_TEST_SalesOrderDetail_UnitPrice_3_data_1',
 FILENAME=N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\FG_TEST_SalesOrderDetail_UnitPrice_3_data_1.ndf',
 SIZE=2MB,
 FILEGROWTH=10%
 )
TO FILEGROUP FG_TEST_SalesOrderDetail_UnitPrice_3;
ALTER DATABASE TEST
ADD FILE (
 NAME=N'FG_TEST_SalesOrderDetail_UnitPrice_4_data_1',
 FILENAME=N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\FG_TEST_SalesOrderDetail_UnitPrice_4_data_1.ndf',
 SIZE=2MB,
 FILEGROWTH=10%
 )
TO FILEGROUP FG_TEST_SalesOrderDetail_UnitPrice_4;
GO