I use a TransactionScope in a thread to dump data in my SQL Server database.
using (TransactionScope scope = new TransactionScope())
{
// Dump data in database
scope.Complete();
}
The transaction is a long transaction (40 secondes) because data are bigs : that's normal.
When I do an Abort()
to stop the thread during this transaction, SQL Server seems to be locked during a few minutes.
What's happened ?
How can I avoid that ?