Re: Processes seen in enterprise manager
From: Jacco Schalkwijk (NOSPAMjaccos_at_eurostop.co.uk)
Date: 04/30/04
- Next message: Dan Guzman: "Re: MSSQL 2000 Standard Edition not utilizing Maximum Memory!!!"
- Previous message: Dan Guzman: "Re: How much space does the long character data type use."
- In reply to: Wayne Antinore: "Processes seen in enterprise manager"
- Next in thread: Wayne Antinore: "Re: Processes seen in enterprise manager"
- Reply: Wayne Antinore: "Re: Processes seen in enterprise manager"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 30 Apr 2004 13:35:27 +0100
I have worked with one third party application whose idea of connection
pooling was to open up 100 connections on start-up, even though it never
used more than 2 during the time we used it. Your third party application
might have been designed by a similarly brilliant and knowledgeable
developer.
You can't set a timeout for the connections, but you can schedule a job to
run the following script on a regular basis. This example kills all
connections that have not been used for 6 hours:
DECLARE @sql varchar(4000)
WHILE 1=1
BEGIN
SET @sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
GETDATE()) >= 6
AND spid <> @@spid AND spid >= 50)
IF @sql IS NULL BREAK
EXEC (@sql)
END
-- Jacco Schalkwijk SQL Server MVP "Wayne Antinore" <wantinore@veramark.com> wrote in message news:OPecmwqLEHA.1340@TK2MSFTNGP12.phx.gbl... > Hi, > We are using a new third party application that has SQL Server 2000 as the > database. It is an ASP page front end and uses ODBC to connect. There are > about 20 people who use it during the day. When I look in EM at the > processes there are well over 100. Even in the morning after everyone has > logged out the night before. All the processes are sleeping so they aren't > using any resources. I feel kind of dumb here but is there a server > property setting where I can set a value for these to expire? Looked in BOL > and in my other books but this doesn't seem to be available. Only timeout > settings when waiting for a connection or running a query. I wasn't worried > about these thinking SQL Server was managing them but then I noticed that > our in house application that uses the same type of setup doesn't have this > problem. > > Thanks, > Wayne > >
- Next message: Dan Guzman: "Re: MSSQL 2000 Standard Edition not utilizing Maximum Memory!!!"
- Previous message: Dan Guzman: "Re: How much space does the long character data type use."
- In reply to: Wayne Antinore: "Processes seen in enterprise manager"
- Next in thread: Wayne Antinore: "Re: Processes seen in enterprise manager"
- Reply: Wayne Antinore: "Re: Processes seen in enterprise manager"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|