learn about sqlserver partitition and partition table --- add or remove table partitions addition more
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
最新文章
- tp
- 关于链接到QQ客服的问题,原来只需要在a标签上加一串话而已呐~~~~
- Effective Java 读书笔记之二 对于所有对象都通用的方法
- KMP算法 hdu4686 Oulipo
- ROC曲线
- NGUI学习笔记(一):官方视频学习记录
- 设计模式------Adapter(适配器)
- routeProvider路由的使用
- Mathematica学习笔记1
- jdk源码剖析一:OpenJDK-Hotspot源码包目录结构
- linux操作系统的前世今生
- chmod命令相关
- zookeeper安装教程
- Android QMI机制
- Next Permutation leetcode java
- HDU 6203 ping ping ping(dfs序+LCA+树状数组)
- 云计算之 PaaS详解
- linux进程原语之fork()
- solr之~模糊查询
- TopJUI | easyui HTML Dialog页面间GET方式数据传递
热门文章
- Mac重装操作系统系统
- 小白学 Python 爬虫(37):爬虫框架 Scrapy 入门基础(五) Spider Middleware
- Go 每日一库之 go-ini
- Spring Boot2 系列教程 (三) | 使用 LomBok 提高开发效率
- cf - 01串的问题
- go微服务框架kratos学习笔记七(kratos warden 负载均衡 balancer)
- Jenkins-正则表达式提取Cookie
- kafka 中 zookeeper 具体是做什么的?
- [转载收藏]C#基础知识梳理系列十一:垃圾回收机制
- python+autoit用法