简体   繁体   English

将现有的群集列存储索引移至其他文件组

[英]Move an existing Clustered columnstore index into a different file group

I am trying to move an existing Clustered Columnstore Index from one file group to another file group but couldn't find any command to do that. 我正在尝试将现有的群集列存储索引从一个文件组移动到另一个文件组,但是找不到任何命令来执行此操作。

Code what I have tried: 编码我尝试过的内容:

ALTER TABLE CCSI ON [dbo].[t179_s1_LOSS_ByEvent_ORIGINAL_440F6776-6185-4416-89D8-B69334457B25] 
WITH ( MOVE TO FG_1 );

Error: 错误:

Msg 156, Level 15, State 1, Line 281 Incorrect syntax near the keyword 'ON'. 消息156,级别15,状态1,第281行关键字“ ON”附近的语法错误。

Msg 319, Level 15, State 1, Line 281 Incorrect syntax near the keyword 'with'. 消息319,级别15,状态1,第281行关键字'with'附近的语法错误。 If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. 如果此语句是公用表表达式,xmlnamespaces子句或更改跟踪上下文子句,则前一条语句必须以分号终止。

Just like a clustered index, recreate it on the target filegroup with DROP_EXISTING. 就像聚簇索引一样,使用DROP_EXISTING在目标文件组上重新创建它。 eg 例如

create table foo(id int, a int)
create clustered columnstore index cci_foo on foo

go

create clustered columnstore index cci_foo 
on foo
with (drop_existing=on)
on fg2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM