Using SQL Server 2012, If I run the following script and then script create (FULL) on the column store index, the WITH clause is generated with no specifications.
DROP TABLE [dbo].[AAA] GO CREATE TABLE [dbo].[AAA] ([a] int NOT NULL, [b] varchar(25) NULL, [c] varchar(25) NULL, [d] date NULL) GO CREATE CLUSTERED INDEX [AAA_IDX_00] ON [dbo].[AAA] ([a]) GO CREATE NONCLUSTERED COLUMNSTORE INDEX [AAA_IDX_01] ON [dbo].[AAA] ([d]) ON "default" GO
CREATE NONCLUSTERED COLUMNSTORE INDEX [AAA_IDX_01] ON [dbo].[AAA]([d]) WITH ( ) ON [PRIMARY] GO
There is conditional logic in the scripting classes that decided if the WITH clause is going to be scripted. The conditional logic was missing a version check for particular column_index_options that are only available in later versions. Logic has been fixed so that the WITH clause is correctly scripted only when column_index_options are available.
Committed revision: 53439
To test this issue, you can just run the script above and then script (full) for the columnstore index in versions 2012, 2014 & 2016. The WITH clause should never script without column_index_options.
To test this issue, you can just run the script above and then script (full) for the columnstore index in versions 2012, 2014 & 2016. The WITH clause should never script without column_index_options.
Verified in ADS v18.0.1-8. Now for columnstore,
1. WITH() is included when DATA_COMPRESSION is specified and
2. WITH() is omitted in SCRIPT to Window > Create (Full) if no option is specified.
Works fine in Table Scripting as well Schema Script Generator.
Verified in ADS v18.0.1-8. Now for columnstore,
1. WITH() is included when DATA_COMPRESSION is specified and
2. WITH() is omitted in SCRIPT to Window > Create (Full) if no option is specified.
Works fine in Table Scripting as well Schema Script Generator.
Issue #15052 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v18.0.1-8 |
No time estimate |
There is conditional logic in the scripting classes that decided if the WITH clause is going to be scripted. The conditional logic was missing a version check for particular column_index_options that are only available in later versions. Logic has been fixed so that the WITH clause is correctly scripted only when column_index_options are available.
Committed revision: 53439