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

Here we go

/* add partitions */

alter database test add filegroup TESTFG_201602;
alter database test add file (name = TESTFG_201602,filename = "C:\var\opt\mssql\data\TESTFG_201602.ndf",size = 1MB,maxsize = unlimited,filegrowth = 1MB) to filegroup TESTFG_201602;
go
alter partition scheme PS_DATETIME_M_TEST NEXT USED TESTFG_201601;
alter partition function PF_DATETIME_M_TEST() split range ( N'2016-01-02T00:00:00.000');
go

That script has an error. you would see if I execute it

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

最新文章

  1. tp
  2. 关于链接到QQ客服的问题,原来只需要在a标签上加一串话而已呐~~~~
  3. Effective Java 读书笔记之二 对于所有对象都通用的方法
  4. KMP算法 hdu4686 Oulipo
  5. ROC曲线
  6. NGUI学习笔记(一):官方视频学习记录
  7. 设计模式------Adapter(适配器)
  8. routeProvider路由的使用
  9. Mathematica学习笔记1
  10. jdk源码剖析一:OpenJDK-Hotspot源码包目录结构
  11. linux操作系统的前世今生
  12. chmod命令相关
  13. zookeeper安装教程
  14. Android QMI机制
  15. Next Permutation leetcode java
  16. HDU 6203 ping ping ping(dfs序+LCA+树状数组)
  17. 云计算之 PaaS详解
  18. linux进程原语之fork()
  19. solr之~模糊查询
  20. TopJUI | easyui HTML Dialog页面间GET方式数据传递

热门文章

  1. Mac重装操作系统系统
  2. 小白学 Python 爬虫(37):爬虫框架 Scrapy 入门基础(五) Spider Middleware
  3. Go 每日一库之 go-ini
  4. Spring Boot2 系列教程 (三) | 使用 LomBok 提高开发效率
  5. cf - 01串的问题
  6. go微服务框架kratos学习笔记七(kratos warden 负载均衡 balancer)
  7. Jenkins-正则表达式提取Cookie
  8. kafka 中 zookeeper 具体是做什么的?
  9. [转载收藏]C#基础知识梳理系列十一:垃圾回收机制
  10. python+autoit用法