Sql server deadlock issue with table bulk insert and update on same table
-
HI Team,
I am facing deadlock issue in the SQL Server. I have two process using the same table at same time. first process will insert the records using bulk insert and second process will update the records in the same table.
Please could you let me know how can avoid deadlock.
-
HI Team,
I am facing deadlock issue in the SQL Server. I have two process using the same table at same time. first process will insert the records using bulk insert and second process will update the records in the same table.
Please could you let me know how can avoid deadlock.
-
You need to synchronise the two processes. Or allow the bulk insert to finish before the updates start. See sql deadlock - Google Search[^].
Is it better to use tab lock on the table during the bulk insert?
-
Is it better to use tab lock on the table during the bulk insert?
-
Is it better to use tab lock on the table during the bulk insert?
If you are using a script to initiate the bulk load, at the end of the script start the process for updating. That is a simple way of synchronizing the processes. :java:
-
HI Team,
I am facing deadlock issue in the SQL Server. I have two process using the same table at same time. first process will insert the records using bulk insert and second process will update the records in the same table.
Please could you let me know how can avoid deadlock.
-
If you are using a script to initiate the bulk load, at the end of the script start the process for updating. That is a simple way of synchronizing the processes. :java:
Both process are different based to the file availability process will kick start. Monthly I am getting deadlock issue when both the files are available at same time by utilizing the same table. As per my knowledge, I need to set lock/ Isolation level at store procedure to overcome this issue.