2017-07-20 17 views
0

我试图将现有的群集列存储索引从一个文件组移动到另一个文件组,但找不到任何执行此操作的命令。将现有的群集列存储索引移动到不同的文件组中

代码是我曾尝试:

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

错误:

Msg 156, Level 15, State 1, Line 281 Incorrect syntax near the keyword 'ON'.

Msg 319, Level 15, State 1, Line 281 Incorrect syntax near the keyword '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.

回答

1

就像一个聚集索引,重新创建与DROP_EXISTING目标文件组。例如

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 
+0

我得到一个错误..当我尝试做它... – Teja

+0

没关系它的工作很好.. – Teja

相关问题