Some of the causes for a long-running transaction include:
An incorrectly written update, insert, or delete statement that runs for many hours. Commands that create cartesian products or include user input are common mistakes in coding.
An application error that starts a transaction but never completes it.