sql分区文件删不的可能解决方法

删除数据库分区的时候报错如下:

ALTER DATABASE [ITMP2] remove FILE F20170427
Msg 5042, Level 16, State 1, Line 1
The file 'F20170427' cannot be removed because it is not empty.
ALTER DATABASE [ITMP2] remove FILEGROUP FG20170427
Msg 5042, Level 16, State 7, Line 1
The filegroup 'FG20170427' cannot be removed because it is not empty.

尝试以下步骤.(我这里是sql2012企业版英文版)
1.收缩数据库
2.shrink file,如下图

  a.选择要删除的分区

  b.shrink action选择Reorganize pages before releasing unused space,数值改成0M

居然我写重复了:http://www.cnblogs.com/birds-zhu/p/6702460.html

原文地址:https://www.cnblogs.com/birds-zhu/p/7363628.html