分区的SQL错误 [英] SQL error with Partition

查看:116
本文介绍了分区的SQL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我有一个带有多个表分区的SQL表。

I have a SQL table with multiple Table Partition.

从数据库我想删除文件和文件组分区。

From the database i wanted to Remove Files and FileGroup for Partitions.

文件已成功删除,但文件组给出了以下错误  :

The files got removed successfully, but the File Group give below error  :

"文件组无法删除,因为它不是空的"

"The FileGroup cannot be removed as it is not empty"

虽然有该文件组中没有数据,并且没有与FileGroup关联的文件,仍然会出现此错误。

Although there is no data in that FileGroup, and there is NO File associated with FileGroup, still it give this error.

如何解决

推荐答案

ALTER PARTITION SCHEME ps

NEXT USED [fg_2] - 指向之前的fg



现在删除fg



ALTER DATABASE dbname

REMOVE FILEGROUP [fg_3]
ALTER PARTITION SCHEME ps
NEXT USED [fg_2] --point to the previous fg

Now remove the fg

ALTER DATABASE dbname
REMOVE FILEGROUP [fg_3]


这篇关于分区的SQL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆