Reputation: 167
Can I alter my memory optimized table? Like adding column or changing data types etc. If yes, how to do it? I am using SQL Server 2014
Thanks
Upvotes: 1
Views: 867
Reputation: 176189
According to Altering Memory-Optimized Tables (SQL Server 2014)
:
Performing ALTER operations on memory-optimized tables is not supported. This includes such operations as changing the bucket_count, adding or removing an index, and adding or removing a column. This topic provides guidelines on how to update memory-optimized tables.
Updating the definition of a memory-optimized table requires you to create a new table with the updated table definition, copy the data to the new table, and start using the new table.
But it will be possible with SQL Server 2016
:
In SQL Server 2016 Community Technology Preview 2 (CTP2) you can perform ALTER operations on memory-optimized tables by using the ALTER TABLE statement. The database application can continue to run, and any operation that is accessing the table is blocked until the alteration process is completed.
In the previous release of SQL Server, you had to manually complete several steps to update memory-optimized tables.
Upvotes: 2