I've got a problem with my transaction. Currently it runs in IsolationLevel.Snapshot. The action it does, can take some time depending on the amount of data, it has to import.
What it does:
- Create a table
- Update a row in another table with information about the new table.
- Inserts a lot of data in the newly created table
Sometimes it won't create a new table, but just insert data into an exisiting table. This is a user choice. The targeted tables have to be read/writeable at all times.
The problem is that a conflict occours radomly. I've might have been using the function around 50 or 70 times, at least, and 3 times, I've got a conflict caused by Snapshot isolation, several seconds after committing, and in a whole other table!
Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.Table' directly or indirectly in database 'DatabaseName' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement.
I have checked, rechecked and double-checked and the transaction does not read from, insert into or update that table at any time.
The problem has occured on two different systems, both running Microsoft SQL Server 2012 Enterprise.
Has anyone experienced something similiar, or have some other experience that can be helpfull to me? Thanks :)