schemazen icon indicating copy to clipboard operation
schemazen copied to clipboard

CREATE CLUSTERED COLUMNSTORE INDEX - Not working

Open mariomineiro opened this issue 8 years ago • 6 comments

Hi, When extracting and creating CCI index the structure is different and it doesn't create the table or index. Example: Source: CREATE CLUSTERED COLUMNSTORE INDEX [CCI_SCHEMAZEN_ROX] ON [dbo].[SchemaZen] Trying to create a normal index: CREATE NONCLUSTERED INDEX [CCI_SCHEMAZEN_ROX] ON [dbo].[SchemaZen] () INCLUDE (columns....) Error giving: Incorrect syntax near ')'.

Thank you in Advance, Mário Mineiro

mariomineiro avatar Feb 04 '17 17:02 mariomineiro

Thanks for reporting. I think this is fixed, but I'm not able to test as Column Store indexes are only supported in Enterprise Edition. Please test using the latest version and let me know if this is fixed. Thanks.

sethreno avatar Feb 05 '17 17:02 sethreno

Hi @sethreno , Thank you for the fast fix, but still not working, I tested only the .exe version. The structured output didn't change from the previous version to this version.

The fix must:

  • "CREATE NONCLUSTERED INDEX" should be "CREATE CLUSTERED COLUMNSTORE INDEX"
  • remove the ()
  • remove the include/columns (CCI don't have include)

I'm available and please let me know if you need help on this.

Thank you in advance, such a great script:+1: excellent new features loved it

mariomineiro avatar Feb 07 '17 10:02 mariomineiro

This should be fixed in the latest version https://github.com/sethreno/schemazen/releases/tag/1.3.51

Again, I'm not able to test so please verify and let me know if it works. Thanks!

sethreno avatar Feb 08 '17 15:02 sethreno

hi @sethreno still not working

mariomineiro avatar Feb 09 '17 15:02 mariomineiro

I'm using msdn as a reference and I don't see anything wrong. Can you give more detail on what's not working? If you could post the script produced by the latest schemazen exe compared to a working script that would be great.

sethreno avatar Feb 22 '17 12:02 sethreno

The issue is in the syntax. The program is creating the following : CREATE CLUSTERED COLUMNSTORE INDEX [IndexName] ON [schema].[table] () INCLUDE (Columns)

but it needs to be

CREATE CLUSTERED COLUMNSTORE INDEX [IndexName] ON [schema].[TableName]

The clustered columnstore index includes all columns as this is how it is designed.

needbrew avatar Apr 11 '17 15:04 needbrew