HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

DELETE failed with errors: A system assertion check has failed. + Range is missing prefix on partition id column

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
partitionassertiondeletecolumnwithrangesystemhasfailedmissing

Problem

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:
, 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 de

Solution

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.

Context

StackExchange Database Administrators Q#337394, answer score: 6

Revisions (0)

No revisions yet.