I am having some issues with sql server deadlocking. Just to explain my scenario: I have the following tables:
tblInvoice has a trigger that fires whenever a modification is done and adds or updates data to the tblInvoiceArchive. It''l basically add a new record if it's a new invoice or update existing data if the invoice was already existing.
Additionally, I have a SSIS package that runs based on a flag in the tblInvoiceArchive table. Once it runs it sets the flag to false.
What's been happening is people are making modifications to some of the data in the tblInvoice table, which then updates the tblInvoiceArchive table at the same time my SSIS package is trying to reset the flag in the tblInvoiceArchive table.
Is there something I can do that will allow these operations to occur with out the deadlocking? My SSIS package updates just one field, while a modification to tblInvoice may update any of the other fields (except the flag column).
Many thanks for your assistance!