5

I have partitioned table with many indexes, all of them are aligned and only one is not. This is because it controls the uniqueness through more then one partition:

CREATE UNIQUE NONCLUSTERED INDEX [ix_uq_fltr_IdTransazioneRettificata_BM] ON [dbo].[Transazioni]
(
    [IdTransazioneRettificata] ASC
)
WHERE ([id]>(10000000000.) AND [StatusFatturazione]<>(15) AND [IdTransazioneRettificata] IS NOT NULL)
ON [PRIMARY]

The error occurs where I do one simple delete:

select id
into #t
from billing_prod2.dbo.Transazioni
where DataInserimento = '20240229' 
and Data = '20240201'
--(162.321 rows affected)

alter table #t add primary key(id)

delete t
from billing_prod2.dbo.Transazioni t
     join #t tt
        on t.id =  tt.id

The output from SSMS:

Msg 3624, Level 20, State 1, Line 11 A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support. Msg 596, Level 21, State 1, Line 10 Cannot continue the execution because the session is in the kill state. Msg 0, Level 20, State 0, Line 10 A severe error occurred on the current command. The results, if any, should be discarded.

The output from errorlog:

Error: 17065, Severity: 16, State: 1. SQL Server Assertion: File: <"cxrowset.cpp">, line = 2026 Failed Assertion = 'cstePrefix >= 1' Range is missing prefix on partition id column. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted. Error: 3624, Severity: 20, State: 1. A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

There is also a dump file that is long enough but if it may halp I can paste it too.

Noone of these says clearly what index has problems.

DBCC CHECKDB says nothing,

dbcc checktable('dbo.transazioni') with NO_INFOMSGS, ALL_ERRORMSGS

says nothing.

The only thing I could guess it should be an index that is not frequently used otherwise more errors would be reported in errorlog, so I started with this one, non aligned and less used.

After dropping it the error is gone so the problem really was in that non aligned index.

Can anyone explain this?

The database has TDE enabled.

Microsoft SQL Server 2019 (RTM-CU22-GDR) (KB5029378) - 15.0.4326.1 (X64) Aug 18 2023 14:05:15 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor)

1 Answer 1

6

Can anyone explain this?

Microsoft SQL Server 2019 (RTM-CU22-GDR)

This was fixed in CU 24 - please patch the system (CU25 is out). If it continues to happen after patching, since it was already identified as a defect, you'll want to open a case with Microsoft Support.

1
  • Thank you @Sean Gallardy, we'll try it, bug reference 2726326 seems to be mine
    – sepupic
    Commented Mar 1 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.