handling of memory optimized tables gives an error
When running indexmaintenance, I got this error: "Msg 41317, Sev 16, State 1, Line 1 : A user transaction that accesses memory optimized tables or natively compiled modules cannot access more than one user database or databases model and msdb, and it cannot write to master. [SQLSTATE 42000]" is it possible to tackle this situation in the indexmaintenance script?
@olahallengren Hi, thank you for your wonderful script. I have a question about this. We use SQL 2019 with some memory-optimized tables. It fails with the same error that wfvdijk wrote. I found that if I set SET @PartitionLevelStatistics = 0 in line 1195. all works as planned. I tried to understand the logic but nothing seems reasonable why this param causes this error. Do you have an idea?