FIX: Error occurs when sp_addarticle is used to add article for transactional replication to memory-optimized table on subscriber in SQL Server 2016 and 2017

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core


Starting from Microsoft SQL Server 2016 and 2017, data types varchar(max), nvarchar(max), and varbinary(max) are supported in memory-optimized tables. Assume that you use sp_addarticle to add article on a table for transactional replication to memory-optimized table on the subscriber in SQL Server 2016. If the table has the above-mentioned types of columns, you may receive an error message that resembles the following:

Msg 10794, Level 16, State 1, Procedure ProcedureName, Line LineNumber[Batch Start Line LineNumber]

The type 'varchar(max)' is not supported with memory-optimized tables. The instance this was tested with was InstanceName.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 


This issue is fixed in the following cumulative updates for SQL Server:

About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:


Learn about the terminology that Microsoft uses to describe software updates.