首页 > 数据库技术 > 详细

learn about sqlserver partitition and partition table --- add or remove table partitions

时间:2020-02-16 22:15:14      阅读:55      评论:0      收藏:0      [点我收藏+]

demo
/* add partitions */

alter database xxx add filegroup FG_=fff_201708;
alter database xxx add file (name = FG_fff_201708,filename = "M:\DATA\SQLDATA\fff_201708.ndf",size = 10MB,maxsize = unlimited,filegrowth = 10MB) to filegroup fff_201708;;
alter partition scheme PS_Tfff NEXT USED FG_TH_CHG_TEMP_201708;
alter partition function PF_TH_CHG_TEMP_MEAS_TIME() split range (N‘20170800000000‘);
go

or you no need to generate new file group just at original or primary group

that drop parttion could not be same as on oracle
/* drop partitions */
alter partition function PF_xxxx() merge range (N‘2013-10-01 00:00:00.000‘);
alter database xxx remove file ffff_201310
alter database xxx remove filegroup ffff_201310

learn about sqlserver partitition and partition table --- add or remove table partitions

原文:https://www.cnblogs.com/partition-liu/p/12317864.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!