By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,364 Members | 1,341 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,364 IT Pros & Developers. It's quick & easy.

Number of open connections

P: 83
Hi,

We are using a remotely hosted sql serer 2005 db. We connect to it/run queries etc. using sql server management studio express.

Is there anyway to view the number of open connections using ssmse, in particular we want to see the number that are being left open ?

Thanks in advance
Apr 10 '08 #1
Share this Question
Share on Google+
5 Replies


deepuv04
Expert 100+
P: 227
Hi,

We are using a remotely hosted sql serer 2005 db. We connect to it/run queries etc. using sql server management studio express.

Is there anyway to view the number of open connections using ssmse, in particular we want to see the number that are being left open ?

Thanks in advance
hi
use sp_who command to know the details

or use the query

[code=sql]

select spid,hostname,loginame,cmd,db_name(dbid) as dbname, status
from master.dbo.sysprocesses
where datediff(dd,login_time,getdate()) = 0
order by hostname
[code]
Apr 10 '08 #2

P: 83
Thanks great advice however when i execute

USE Master
EXEC sp_who

it returns

0,runnable,access2o_Admin,TIM-PC,0,master,SELECT,0

and never seems to change although i know others are connected (the site is high usage). TIM-PC is the name of my PC.

Is this because i don't have the right permissions ? btw, not sure if it's relevant but all users connect with the same connection string and username namely 'access2o_Admin'
Apr 10 '08 #3

ck9663
Expert 2.5K+
P: 2,878
Maybe no connections are left open.

-- CK
Apr 10 '08 #4

deepuv04
Expert 100+
P: 227
Thanks great advice however when i execute

USE Master
EXEC sp_who

it returns

0,runnable,access2o_Admin,TIM-PC,0,master,SELECT,0

and never seems to change although i know others are connected (the site is high usage). TIM-PC is the name of my PC.

Is this because i don't have the right permissions ? btw, not sure if it's relevant but all users connect with the same connection string and username namely 'access2o_Admin'
hi,
for more details use the following query

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. select spid,HostName,db_Name(dbid),Program_Name,Login_Time,Status 
  4. from master.dbo.sysprocesses
  5. order by hostname
  6.  
  7. or 
  8.  
  9. select * from master.dbo.sysprocesses
  10.  
Apr 11 '08 #5

P: 83
thanks for all this however i did discover it was a permissions problem...

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=301301&SiteID=1

My provider wont grant me the permissions :( so i guess i'm stuffed unless anyone has any other suggestions ?
Apr 11 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.