There is only one way to fix it to make your code run faster. However, if your SQL server is too busy, this issue will occur. You should eliminate the temporal table and build your mechanism to record version data like what Microsoft is doing.
Data modification failed on system-versioned table
System.Data.SqlClient.SqlException: Data modification failed on system-versioned table because transaction time was earlier than period start time for affected records.
The statement has been terminated.
System.Data.SqlClient.SqlException (0x80131904): Data modification failed on system-versioned table because transaction time was earlier than period start time for affected records.
The statement has been terminated.
SQL Server Other
2 answers
Sort by: Most helpful
-
-
Anonymous
2023-05-18T08:22:52.5133333+00:00 Hi @Dipesh Prajapati
Based on the error message you gave, I found this thread similar to yours: https://dba.stackexchange.com/questions/211467/error-updating-temporal-tables.
Hope this helps you.
Best regards,
Aniya