March 13, 2003 at 3:45 pm
How do we detect if there are any orphan SPID's holding resources at the database level.
For eg. in Oracle theres a process PMON which comes and cleans up the dead processes and it also releases all the locks held by the dead process.
I am experiencing the same thing where the DATABASE is holding up these locks indefinetly.
Any help on this topic is very well appreciated.
Thanks
-Soumil
March 14, 2003 at 7:52 am
/*sp_who will return:
spid (system process id)
where spid 0 - 50 = MSSQL Reserved spid's
and spid >= 51 = User/application spid's
ecid (execution context id)
where 0 = parent thread
and 1,2,3...n = sub threads
status (process status)
loginname
blk = spid for blocking process
where 0 = no blocking process
and -2 = blocking orphan transaction
dbname = database used by process
cmd = SQL Server command executing for process
*/
USE master
EXEC sp_who
March 14, 2003 at 2:24 pm
Thanks for the info.
Does -2 inthe blocked always indicate an ORPHAN transaction or only in the case of Distributed Transaction?
Thanks
-Soumil
May 15, 2007 at 11:40 pm
Does anyone know where orphan distributed transaction comes from?
May 16, 2007 at 8:10 am
I didn't think we had orphaned transactions in SQL. You can use dbcc opentran to find open transactions, but I thought that if the client dropped the server would rollback.
May 16, 2007 at 8:18 am
Please check this link:
http://support.microsoft.com/kb/271509/en-us
How to resolve blocking problems that are caused by lock escalation in SQL Server
Minaz Amin
"More Green More Oxygen !! Plant a tree today"
May 16, 2007 at 9:00 pm
The problem may be with any SQL DMO or sp_OA* code you may have... if you forget to close and drop connections, you may end up with a "connection leak".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply