Indeed. I get the same issue. I created your type in AdventureWorks2016, which seems to have a few more memory-optimized data types, and they also errored out.
I would guess the issue is in DBCC CHECKDB.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I recently installed CU 13 on my test SQL Server 2019 server.
Now, when running CheckDB I'm getting a consistency error with a simple memory optimized table type.
CREATE TYPE [dbo].[ADUserType] AS TABLE(
[UserId] VARCHAR NOT NULL,
[Name] VARCHAR NULL,
PRIMARY KEY NONCLUSTERED (UserId)
)WITH ( MEMORY_OPTIMIZED = ON)
GO
DBCC CHECKDB (MyDatabase) WITH EXTENDED_LOGICAL_CHECKS
"Verified integrity of statistics 'sys.TT_ADUserType_094028A5.PK__TT_ADUse__1788CC4D0F98FE70'. Msg 9122, Level 16, State 201, Line 17 The statistics 'sys.TT_ADUserType_094028A5.PK__TT_ADUse__1788CC4D0F98FE70' is corrupt."
Is this a bug in the update? Or do I need to create the type differently?
Thanks!
Indeed. I get the same issue. I created your type in AdventureWorks2016, which seems to have a few more memory-optimized data types, and they also errored out.
I would guess the issue is in DBCC CHECKDB.
Hi @John ,
In CU13 for SQL Sserver2019, corrupt statistics can be detected by using extended_logical_checks as part of DBCC CHECKD, try to update the statistics:
https://learn.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/statistics-for-memory-optimized-tables?view=sql-server-ver15
-------------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
I reproduced the same problem in SQL Server 2019 on Linux (Docker).
It started in CU13 and was fixed in CU17.