• @matt-2 Miller (#4): no

    @sergiy, @Lynn Pettis: because the SESSION's row are delete few time after, you can see this on code. When a new row is inserted the previous is generally already deleted. Then when id is duplicate it can insert into SESSION, but fails on SESSION_HIS (that has all records) when the trigger on SESSION run on second duplicated identity. I have a row on SESSION and one on SESSION_HIS with same identity but different GUID (then 2 different row inserted into SESSION).

    I think that there is some other code the works on these tables that has not been documented. But nothing found until now 🙁

    If you have other ideas on how log this to understand what happens you are welcome 😉 Remember that it can runs for many time until the error happens, so I want to avoid resource intense logging/tracking

    Thanks for your suggestions.