SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sleeping transaction
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Corobori
Posting Yak Master

Chile
105 Posts

Posted - 09/25/2006 :  23:31:51  Show Profile  Visit Corobori's Homepage  Reply with Quote
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

Edited by - Corobori on 09/25/2006 23:54:48

chiragkhabaria
Flowing Fount of Yak Knowledge

India
1907 Posts

Posted - 09/26/2006 :  02:09:33  Show Profile  Visit chiragkhabaria's Homepage  Send chiragkhabaria a Yahoo! Message  Reply with Quote
sp_who or sp_who2 ???

Chirag
Go to Top of Page

Corobori
Posting Yak Master

Chile
105 Posts

Posted - 09/26/2006 :  13:26:22  Show Profile  Visit Corobori's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000