Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sleeping transaction

Author  Topic 

Corobori
Posting Yak Master

105 Posts

Posted - 2006-09-25 : 23:31:51
1) My hosting company allows us to see a list of sleeping transaction. I am wondering what is the sp or the command allowing to do this ?

2) How is it possible that this causes a sleeping transaction when I am just me on the db:


set conMD = Server.CreateObject("ADODB.Connection")
conMD.ConnectionTimeout = 15
conMD.CommandTimeout = 30
conMD.CursorLocation =1
conMD.Open Application("conMD_ConnectionString")

sSQL= "SELECT Cd_Numero, Cd_Texto"
sSQL= sSQL & " FROM tblCodigos"
sSQL = sSQL & " WHERE Cd_Tipo=10"
sSQL = sSQL & " AND Cd_Lenguage=5"

Set rst = Server.CreateObject("ADODB.Recordset")
rst.open sSQL,conMD,adOpenForwardOnly,adLockReadOnly,adCmdText

do until rst.eof

if cint(rst("Cd_Numero")) = 1 then
Cd_Texto=rst("Cd_Texto")
else
Cd_Texto2=rst("Cd_Texto")
end if

rst.MoveNext
loop
rst.Close
set rst=nothing

conMD.close
set conMD=nothing


jean-luc
www.corobori.com

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-26 : 02:09:33
sp_who or sp_who2 ???

Chirag
Go to Top of Page

Corobori
Posting Yak Master

105 Posts

Posted - 2006-09-26 : 13:26:22
Almost there. What they are also showing is the SQL or stored procedure involved:
Exampox
SPID Login Status CPU Time Last Run Event Info
106 xxxxxx sleeping 2.885 9/26/2006 10:11:11 AM SELECT TOP 100 PERCENT Ma_Id, Ma_Marca FROM tblMarcas WHERE (Ma_Nivel = 2) GROUP BY Ma_Id, Ma_Marca ORDER BY Ma_Marca

jean-luc
www.corobori.com
Go to Top of Page
   

- Advertisement -