Let Sleeping SPIDS Lie

Jan 24, 2008

A developer came over and asked me a couple of things

1. Can C# not cleanup SPIDs and just open new ones lieing around

2. Do a large number of spids, even if they are sleeping, cause performance issues?

3. What's the Max # of spids sql server can handle?

BOL ain't too helpful right now

View 14 Replies


ADVERTISEMENT

To Get All The SPIDs

Nov 13, 2007

is there any way to get all the SPID's running a particular Stored Proc?

Thx
Venu

View 3 Replies View Related

Hanging Spids

Feb 22, 2001

We have just combined 3 sites into one server.
Two of the sites are serving fine, however one site has spids
that won't disconnect. By the end of the day there are over 600 spids
from that one site. At first we thought it was due to the ASP pages
had a db connect, but nothing that closed that db connection. But after
they modified the pages, we are still having the same problem. Checked
the webserver and they are identical to the other webservers.
Any ideas???

View 1 Replies View Related

Linguring SPIDS

Jul 23, 2005

SQL Server 2000Just curious - was wondering why some SPIDS are left hanging out therefor up to several weeks. There are no errors or anything. It looks likenormal processing.Thanks,Craig

View 1 Replies View Related

Multiple User SPIDs Which Won't Go Away??

May 22, 2001

I have an issue with a server where some users are recieving error messages along the lines of "There are currently 250 connected users etc....". the result of which is that the users sometimes can't connect. The server properties have Current Users set to 250 - I know that I could increase this figure but that doesnt't appear to be the problem.

It would seem that connections appear to stay connected even though the user has finished any server/client transactions. Also there seems to be a huge number of SPIDs even when there are only a handfull of users. Most of the 'Process Details' for these user threads show the following: "IF @@TRANCOUNT > 0 COMMIT TRAN".

What is going on and why are these Process IDs hanging around, sometimes the only option is to reboot the client PCs since trying to kill the processes just makes them reappear a few seconds later?

It could be the 32-bit client application causing it, but these problems are only on one server out of half a dozen.

Any ideas?

Thanks, Derek.

View 2 Replies View Related

SQL Server 2000 Spids Blocking Themselves

Oct 19, 2005

Hey guys,

I've recently noticed some strange behaviour with sql server 2000 spid's blocking themselves. The spid will appear to be blocked for short periods of time, and then the block will disappear. I'm not sure how this could occur. It started appearing around the same time as I applied SP4.

If anyone could provide any insight into this, it would be greatly appreciated.

Cheers,
-Kilka

View 7 Replies View Related

Merge Replication And Spids Left Behind

Jul 20, 2005

We are using Merge replication with clients from remote offices (SQL2000, sp3). Recently, I have had a problem with users who arereplicating, and they shut down their laptops. The connection neverdies, and I end up with major blocking issues related to the"orphaned" spid. The tables that are blocked are used to filter dataon each client. Since the orphaned spid is blocking, backups will runforever, and have to be killed, and a SQL management job thatinserts/updates data in these tables has to be killed.If I kill the spid, it shows a rollback at 0% and the status neverchanges. The user has disconnected, and there is really nothing toroll back. How can I get rid of this spid with out restarting SQLserver, or rebooting my server?Any help would be greatly appreciated.Thanks,Amy M

View 1 Replies View Related

Can Multi-CPU Spawn Several SPIDs From One SP Execution?

Jan 24, 2008

Hi,

The myComplexProc stored proc does the following in sequence:
1. Call a UDF
2. Call another Stored Proc
3. Make a SELECT with 4 joins
4. Make another SELECT 4 joins + aggregate.

Question1: if myComplexProc is executed on 4-CPUs SQL2K Server, does it start and complete with a single SPID?

Question2: Is SQL2K smart enough to do some sort of parallelism behind the scene? If yes, can it spawn some extra SPIDs? How does it handle lock or sequencing? Because in the hypothetic scenario above Step N+1 re-uses the results of Step N so it has to wait for Step N to complete.

Thanks very much in advance for any help.

View 2 Replies View Related

SQL Server Phantom SPIDs Causes Locking And Delays

Nov 10, 2003

A fellow developer of mine has created a ASP.Net application that executes some fairly complex stored procedures. This application is for all intensive purposes a queue and 3 or 4 people work on processing items in a FIFO type environment. There is logic in the Stored procedures to make sure each worker get a unique entry using a series of query hints.

Well what we are seeing is if these works are moving at a rapid pace and we execute an sp_who2 on the sql server there are entries that that seems to be hanging there and REMAINING there even after a browser is closed or the disposed method has been called on the connection object. Has anyone else experienced something similar to this with an ASP.Net application used by mutiple people?

My inclination is to blame the design of the application, but before I do that and step on my co-workers toes I thought I would throw this out to the group.

Thanks in advance for your input.

View 7 Replies View Related

Performance Of Views Accessed By Multiple SPIDs?

Jul 23, 2005

I wonder if anyone has any hard fact based pro or contra, especially onperformance, about having views as opposed to tables when the object isbeing accessed for read only by multiple sessions/users/spids. I amparticularly concerned about the multiple instantiations of the view.Relevant thoughts on this are much appreciated.Thanks,Caveman

View 1 Replies View Related

Connection Sleeping

Mar 8, 2007

If an MS SQL 2005 Connection is sleeping in the activity monitor, does it mean it's not closed? I'm pretty sure it's closed, just want to confirm. Lately, our DB server got hammered with requests and it reached max-pool size (we implemented caching after that). 

View 3 Replies View Related

What Does Sleeping Process Will Do

Aug 16, 2000

what does the sleeping process will do
I am running the following stored procedure
the cpu value is increasing by time.
I am killing old process manually.
How to stop the sleeping processing.

CREATE PROCEDURE SP_MONITOR2 AS
select spid, hostname,cpu,status,datediff(mi,last_batch,getdate ())Diff_in_Min
from sysprocesses
where hostname <>'' and
last_batch <>'1900-01-01 00:00:00.000'
order by Diff_in_Min desc

the output is

spid hostname cpu status Diff_in_Min
------ -------------------------------------------------------------------------------------------------------------------------------- ----------- ------------------------------ -----------
47 EADMIN2 3662 sleeping 75
9 SETUP6500 11375 sleeping 60
82 EADMIN2 13271 sleeping 59
7 EADMIN2 5147 sleeping 49
27 EADMIN2 4647 sleeping 49

View 1 Replies View Related

Sleeping Connections

Feb 10, 2004

Hi,

I have written an application in VB6 connecting to a SQL Server 2000 database using ADO. This app is running on the same computer as SQL Server.

What I am seeing now is that each day 2-3 new connections are being created by SQL and these connections have a "sleeping" status and "AWAITING COMMAND" command. Also, when double-clicking a
connection, it's last TSQL statement is empty... This way, connections are piling up.

Does anyone have an idea why this is happening and what I can do to avoid this ? Also, how can I determine what is causing this ?

Many thanks,

Jurgen Sanders

View 3 Replies View Related

Sleeping Processes

Mar 8, 2007

Hi, just a quick problem/question. Why do processes in the middle of the package goto sleep? Is there a method of making them go?

View 2 Replies View Related

Cursor In Sproc To Kill Spids Loops Forever

Mar 20, 2000

I need a stored proc to kill spids, but the following sproc loops infinitely with the same [correct] spid being printed out. What am I doing wrong?

The select statement, when I execute it via the query grid, returns the correct and finite number of spids.

Any help greatly appreciated.
Judith


CREATE PROCEDURE rasp_KillDBProcess
@dbname varchar(128)
AS
declare @KillSpid smallint
declare @SQL varchar(1000)
--
declare DBCursor cursor Forward_only for SELECT distinct l.spid
FROM master.dbo.syslocks l INNER JOIN
master.dbo.sysdatabases d ON l.dbid = d.dbid
WHERE (d.name = N'coj_pcisdata')
open DBCursor
--
Fetch next from DBCursor into @Killspid
--
While (@@Fetch_status <> -1)
Begin
If (@@Fetch_status <> -2)
begin
print 'spid = ' + cast(@killspid as varchar(12))
--exec ('kill ' + @killspid)

end
--
end
Fetch next from DBCursor into @Killspid
--
close dbcursor
deallocate dbcursor
print 'end'

return

View 1 Replies View Related

Disconnect A User Whoz Locking The DB With Diff SPIDs

Jun 1, 2004

I have issued a simple insert statement on table and the statement could not insert a single row into the table.When i check the locks on the tables i found that almost 5000(five thousand) locks on the table for a single user with different SPID(s).
The user is and sql server user(not a windows user) and used to connect to the application.I wanted to disconnect the user from the DB so that all the locks will be freed.But i dunno how to disconnect a user from the DB. I know that i can issue KILL command to Terminate a user process based on the system process ID,but here the same user has nearly 1000 SPIDs.I thought that it would be very big job to kill each and every process and restared the sql server.but i guess its not the correct process to do.
how can i dosconnect a specific user from the DB.

Thanks.

View 1 Replies View Related

Not Able To Kill Sleeping Process

Apr 20, 2001

I have SQL Server 7.0 and I am not able to kill one of the SPID's who is running a SELECT Statement and showing as sleeping.
When I saw in the current activity in EM I see the STATUS as sleeping
COMMAND as SELECT, APPLICATION as Microsoft Transaction server, WAITTIME as 7877 and WAITTYPE as EXCHANGE and CPU 10074
Thanks in advance.

View 1 Replies View Related

Process Status Sleeping

Jan 6, 2006

I have processes running on the server that show a status of "sleeping" from sp_who and sysprocesses, however they are still running. I run sp_who over and over again and only occasionally the process status shows running, and then switches back to "sleeping" or "defwakeup". I know what all the statuses mean, I just don't know why a running process would ever show as "sleeping". The processes take a very very long time to run as well.

Thanks in advance,
Steve

View 1 Replies View Related

Process Status Sleeping

Sep 27, 2007

Hi guys,

I may be asking a foolish question but I really need an answer for it.. We have our centralized servere where SQL Server 2005 is installed.... Whenever open the management studio from our desktops, execute some queries (It may be any simple query such as select * from) I find the status of that process 'sleeping'...untill we close the studio or in other words untill that process is killed..

I find the status by Management -> Activity monitor...

Please help me with it...

Has there been anything wrong while setting up Sql Server ?

Please help me ...

Thank you so much...

Saket.

View 3 Replies View Related

Sysprocesses Memusage Sleeping

Nov 3, 2005

I was trying to find the bottle neck on our server while we wererunning a couple very large updates.I ran the following query and noticed there were a couple sleepingspid's that were really eating up the memory. One had a value of16000.I guess my question is was this query still holding on to that memoryeven though the query had finished? Why didn't SQL Server clean it up?select spid,substring(Loginame,1,10) Login,memusage,substring(hostname,1,15) Host,program_name,cmd,statusfrom master..sysprocessesorder by memusage desc

View 1 Replies View Related

[MSSQL + VS.NET] Connection - Sleeping

Jul 20, 2005

HelloI've prepared a small aplication in VS.NET and I use SqlConnection class.Everything is ok, but when I'm trying to disconnect from server usingif (cnSQL->State != ConnectionState::Closed) cnSQL->Close()there is still connection do server present. I have to close connectionbecause I'm trying to drop this database.Have you ever heard about this kind of problem??Trociu--Plain-text over all!!!/**********/write me : trociu@autonom ict pwr wroc plsearch me : gg: 1382729

View 1 Replies View Related

Process With Status SLEEPING.

Apr 3, 2007

Hi all,



We have a web application with multiple users connecting to SQL Server 2005 database.



Once the users start using the system, I could see in the Process Info from the activity monitor with a several process with status as sleeping and command as Awaiting Command.



I have few questions regarding this for which simple answers would help me ( I searched and couldnt understand from the pages that explained the process information )



My questions are,



1. Does the processes with status sleeping and command as Awaiting Command are needed for the application even after the operations specific to them are complete?



2. Does these process affect the performance ?



3. Does killing these process would affect the application connectivity ?



4. Why do we get several process with status sleeping and command as Awaiting Command? Is this because of the front end programming errors ?



5. What should we do to avoid the increasing number of process with status sleeping and command as Awaiting Command?



Any help would be appreciated.



Thanks in advance,



DBLearner.

View 15 Replies View Related

How Can I Kill Sleeping Processes In SQL Server?

Sep 14, 2006

Dear, Our ASP.NET scripts send SQL statements (as inline SQL or SP) to process the requested job. After the job execution, the process ID stays in the server and waits for next command with sleeping status.Since this process does not go away, next job adds another process and eventually, the server is overloaded with these processes and dies. How can I kill this sleeping processes?Regards,Echo

View 6 Replies View Related

Blocked 'sleeping' Active Connections

Sep 27, 2005

Hi

We just installed SQL service pack 4. I am now finding that when doing a sp_who2 active, there are a lot of connections that are blocked by itself. The common factor is they all have a status of 'sleeping'. The strange thing is that even though it shows the connection is blocked, it is in fact not and will still return results. Below is a snapshot of a portion of what the sp_who2 active returns:

SPID Status Login HostName BlkBy DBName
53 sleeping sa TRACKER 53 dbABC
58 sleeping sa TRACKER 58 dbCDE
64 sleeping sa TRACKER 64 dbSTA
66 RUNNABLE User12 PC24 . master
70 sleeping User5 ANALYSIS 70 dbBML
74 sleeping sa TRACKER 74 dbCDE
76 sleeping sa TRACKER 76 dbPTS
83 sleeping User5 ANALYSIS 83 dbANA
86 DORMANT User11 CPTDB . NULL

Has anyone seen this? Is it related to the installation of service pack 4? (We have installed the services pack on many other SQL servers, but have not come accross this before.

Tx,
TessZA

View 1 Replies View Related

SLEEPING/AWAITING COMMAND Question

Dec 3, 2005

I am using SQL Server 2000. In Enterprise Mgr, under Management/CurrentActivity, I see a list SPIDs.I have a multi-tiered .NET web app that uses ADO.NET to connect to thedatabase. Each time a Stored Proc is called, a new connection is opened, thedata retreieved, and the connection closed and set to Nothing (in VB.NET).Yet, I see several (15 or so) SPIDs for the user ID that the web app uses toconnect to the database.The database is local and private, so I know all connections are from me.What does Status=SLEEPING Command=Waiting Command mean?What will happen when we get 1000's users on the web app?Is SQL doing some kind of connection pooling?

View 1 Replies View Related

SQLExpress - SQL Developer - Let Sleeping Dogs Lie...

Jan 17, 2006

Has anyone done this and about pulled thier hair out?

I downloaded visual express for web development with sql express. Running fine. Like SQL so much, decided to pop for the Developer package. I don't know what I was thinking, maybe I was going to pay for popcorn for billy g & family in the home theatre that night...but I digress.

After much consternation and a 4:00 a.m. adventure, I managed to get rid of SQL Express and install the developer edition. Now were fine. Even ran the aspnet_regsql and set up the aspnetdb database.

I'm thinking, back to development here.

I select APP_DATE and if I try to add the ASPNETDB.mdf file I get the application is being used by another process. Please close all applications that might access this file and try again. So, I then try to create a new database file. I get this error:



Connections to SQL Server Files ( *.mdf) require the SQL Server Express 2005 to function properly.

I can create a connection to the aspnetdb database in the database connections. However, as I work with some of the new ASP NET Membership/Role code, I find it doesn't work.

Will most code work if the ASPNETDB.mdf is not set up int he APP_DATA section?

Come on Microsoft, I can't be the only shoe-string developer that is going to try this.

Has anyone done this and resolved how to get these two to play along.

If I upgrade to Visual Studio, will I still be straddled with SQLExpress.

Can I run SQLExpress side by side with SQL Developer addition?

View 2 Replies View Related

SQL Server Admin 2014 :: MDW Data Collector - Large Number Of SPIDs

Nov 6, 2015

I've installed the MDW (Mangement Data Warehouse) database on our central monitoring SQL Server. I've then added a number of servers to be monitored. The data is collected on the servers that are being monitored and uploaded to the central MDW Monitoring server.

On the servers that are being monitored, I'm seeing a large number (over 1000) of SPIDs being generated by 'SQL Server Data Collector'.

Is this normal behaviour? I've seen more blocking as a result of this.

Is there any way to reduce the number of SPIDs generated?

View 0 Replies View Related

Sleeping Processes Take A Long Time To Kill-

Jul 23, 2005

Hello all. I have many connections that are sleeping. I can rightclick, kill, up to 2 at a time. It takes about 20 seconds to kill it.Is that normal? I tried to make a stored procedure to kill them but itate all the power of the server, (all users yelled at me at the sametime :o) )Is this length of time normal for killing these processes?ThanksJeff

View 6 Replies View Related

Open Transaction With Sleeping Status And Wait Type As AWAITING COMMAND

Sep 4, 2015

During our DR drill we found that the same code which used to run perfectly fine on our Primary Data Centre is running very slow on Disaster Recovery DB Server and there are Lot's of open transaction with sleeping status and waittype as 'AWAITING COMMAND'.CPU, Memory and disk utilization are good. The ping reply between the app server and the DB server is well within the limit's even blocking is not their, also nothing is reported in the error logs. We are using SQL server 2014 STD 64 BIT on Windows Server 2012.

View 6 Replies View Related

SQL 2012 :: Sleeping Queries Blocking Rebuild Index And Update Statistics Job In AlwaysOn

Feb 3, 2015

At one of your client sides we have configured Always on with synchronous mode.Also we have schedule rebuild index and update statistics job which runs in night every alternate day. the issue is there are more then 100 sleeping queries which is blocking update statistics job.

I have to stop update statistics job manually once i come to office manually.

Once I have killed blocking sleeping query but then other sleeping query blocked it and so on.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved