Development

Limitation of In-Memory OLTP in SQL Server 2016 – Sp_rename not allowed

Hi friends, one more limitation of In-Memory OLTP is SQL Server 2016 is that sp_rename is not allowed to change the name of in-memory OLTP objects.

Sp_rename is a system stored procedure which allows to change the name of the user-defined objects like table name, column name, datatype of a column etc. in the current database.

Let’s see an example of this –

There is already an In-memory table created with name ‘Test_OLTP’ and now I like to rename it with a new name ‘MemOLTP’.

I have executed the below query to rename the table name.

sp_rename ‘dbo.Test_OLTP’,’MemOLTP’

When I executed the query it comes up with an error stating –

‘Operations that require a change to the schema version,

for example renaming, are not supported with memory optimized tables.’

Lim_Sp_rename

That’s all for the day folks 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s