I've developed an interface from
ERP SAP Business One to warehouse management, and am facing problems concerning database locks. My program includes direct write operations into the
ERP database (a user defined field is filled during asynchronous event processing after creating or changing a sales order). It is suspected to be responsible for blocking situations occurring quite often each day.
When a blocking situation occurs,
sp_who2 gives me information about blocking and blocked processes, every time pointing to an
spid used by the
BPM management software as the "root blocking process". The status of this
spid is always shown as "sleeping".
Can a "sleeping" process cause a database lock for other processes, e.g. when transactions weren't committed?
How can I find out the last command of the sleeping process?