title: Handle deadlock in C# Service
body: <p>I have one service in C# which fetch records from oracle DB and insert into MySql DB, after a successful insert of all records in MySql DB one of the column of my Oracle DB gets an updated i.e these many records has got inserted.</p>
  
  <p>Since being a service it's getting called after every 5 sec.</p>
  
  <p>My problem is that how should i handle the deadlock situation in this case. Like my service fetches around 20,000 records from oracle DB and trying to insert in to MySql DB that takes around 7-8 seconds, mean while my service will get called, and since all records of previous session are not getting inserted there won't be update in Oracle DB and next time it will again fetch the whole records, that i don't want.</p>
  
  <p>If possible provide some same code as well. This is pure Window base service not WCF. </p>