I want to Know How many Connection are open on Sql Server

Discussion in 'Databases' started by VishalVasani, Feb 21, 2007.

  1. #1
    Hello,

    Any idea how to check how many connection open on sql server.
     
    VishalVasani, Feb 21, 2007 IP
  2. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Your Content, Feb 21, 2007 IP
  3. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i want to know how many connection open at a instant & i have check the Microsoft link it is related to other things
     
    VishalVasani, Feb 22, 2007 IP
  4. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i want to know how many connection open at a instant & i have check the Microsoft link it is related to other things
     
    VishalVasani, Feb 22, 2007 IP
  5. JenniP

    JenniP Peon

    Messages:
    250
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you have the correct rights try

    sp_who

    or

    sp_who2

    However either of these can require some fairly high level rights which if your on a shared database you may (in fact should) not have.

    Basically any other way of doing it would require those same rights, the only way to "get around it" would be for your hoster to create a stored procedure that you did have access to, that accessed that data.

    The way sp_who/sp_who2 works varies on different versions of SQL Server, on 2005 is may work regardless of server rights but only return data relating to parts of the database you already have access to.

    Jen
     
    JenniP, Feb 22, 2007 IP
  6. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok

    I got it i am looking for this stuff
     
    VishalVasani, Feb 22, 2007 IP
  7. MarkusJ_NZ

    MarkusJ_NZ Well-Known Member

    Messages:
    240
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Also, the is quite handy as well sp_lock, it shows what processes have locks on tables on the server.
    Cheers
    Mark
     
    MarkusJ_NZ, Feb 22, 2007 IP
  8. rukunsh

    rukunsh Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You can find out the connections are open in sql server

    by using the sql query

    SELECT SPID,
    STATUS,
    PROGRAM_NAME,
    LOGINAME=RTRIM(LOGINAME),
    HOSTNAME,
    CMD
    FROM MASTER.DBO.SYSPROCESSES
    WHERE DB_NAME(DBID) = 'your database name' AND DBID != 0

    Please mark it as answer if ok
     
    rukunsh, Dec 27, 2010 IP
  9. prptl709

    prptl709 Guest

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It's good question about database connection.You got the particular answer then please reply me.
     
    prptl709, Feb 23, 2011 IP
  10. linkbooster

    linkbooster Banned

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    According to me We have the following settings in our web.config file to store session i am not sure but we could done using this one .
     
    linkbooster, Mar 29, 2011 IP