Error:

Msg 13545, Level 16, State 1, Line 14
Truncate failed on table ‘tbXXXXX’ because it is not a supported operation on system-versioned tables.

Resolution:

-- Disable the system version table
ALTER TABLE tbXXXXX SET (SYSTEM_VERSIONING = OFF);

--Truncate data
TRUNCATE TABLE tbXXXXX

-- Enable the system version table
ALTER TABLE tbXXXXX SET ( SYSTEM_VERSIONING = ON );

Links:

https://rajeevdotnet.blogspot.com/2019/05/truncate-system-version-table-temporal.html

Last modified: September 5, 2024

Author

Comments

Write a Reply or Comment