top of page
Search
Writer's picturepartition liu

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



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

0 views0 comments

Recent Posts

See All

Comments


bottom of page