Forum Discussion
Transaction (Process ID) was deadlocked on lock resources with another process
- 1 year ago
I already found the problem.
When I checked System_health in extended events.
I see the details of deadlock as you said.But there, it's not problem about my code. It's about PowerBI Report Server bug.
After translate all these hard-to-understand-xml. I found out that have a problem with table CatalogItemExtendedContent . Made by PowerBI Report Server.
Finally, the deadlock is from sp: InitializeCatalogExtendedContentWrite
The code here:It deadlock because of that UPDATE.
Now I just need add WITH (ROWLOCK, UPDLOCK).
UPDATE [dbo].[CatalogItemExtendedContent] WITH (ROWLOCK, UPDLOCK) SET Content = 0x WHERE ItemID = @CatalogItemID AND ContentType = @ContentType;Voila . It no longer deadlock in my situation
I already found the solution is in the stored procedure name: "InitializeCatalogExtendedContentWrite"
This sp created bug is not from us. It from PBIRS.
Just go to the Server where PowerBI located.
And add " WITH (ROWLOCK, UPDLOCK)" after the UPDATE command.
It will lock the rows instead of entire table.
And Voila, The deadlock does not appear again.