top of page
Search
Writer's picturepartition liu

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




Yes . In the previous. chapter , we see how to generate "partition function" "parttiton schema" and "parttiton table"

what can we do if we need to add or drop an table partition ?


Here is exist status:


/* add partition (oracle)== split partition (oracle,mssql) */

/* drop parttiton (oracle) == merge partition (mssql) */


and



However, It is right about "less than", because we use range right --- it will be talk about it in detail



Let get into bussiness, hot to fix that ?


Yes, we merge it


/* drop partitions */

alter partition function PF_DATETIME_M_TEST() merge range (N'2016-01-02T00:00:00.000');

--alter database test remove file TESTFG_201602;

--alter database test remove filegroup TESTFG_201602;


then we can see that return

and we can make it right


alter partition scheme PS_DATETIME_M_TEST NEXT USED TESTFG_201602;

alter partition function PF_DATETIME_M_TEST() split range ( N'2016-02-01T00:00:00.000');

go



Yes. we did it



OK. Becareful , only empty partition can be merge . What about if the partition contains data ? We will see in the next chapter.

0 views0 comments

Recent Posts

See All

Comments


bottom of page