Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL syntax for db connection count

Options
  • 05-09-2005 5:13pm
    #1
    Registered Users Posts: 1,144 ✭✭✭


    hows it goin everyone? dont know if this is the correct forum for this question but Does anyone know the syntax for the SQL command to return the total amount of connections to a database?

    any help would be appreciated

    cheers


Comments

  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    What DB are you using?


  • Registered Users Posts: 1,144 ✭✭✭gracehopper


    dublindude wrote:
    What DB are you using?

    SQL SERVER2000


  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    Sorry, never used any Microsoft DBs.

    I am SURE google can be your friend here... :)


  • Registered Users Posts: 37,485 ✭✭✭✭Khannie


    Moving this to the programming forum......you'll probably get your answer there.


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    dont know if this is the correct forum for this question but Does anyone know the syntax for the SQL command to return the total amount of connections to a database?

    Depends on what you mean, but my first reaction would be to point you at the sysprocesses table.

    Read up on it in the books online, and play with it a bit. If its not what you're looking for, then maybe supply a bit more detail as to what exactly it is you want, and why sysprocesses isn't the answer.

    jc


  • Advertisement
  • Registered Users Posts: 302 ✭✭BlueSpud


    hows it goin everyone? dont know if this is the correct forum for this question but Does anyone know the syntax for the SQL command to return the total amount of connections to a database?

    any help would be appreciated

    cheers



    Count the connections,
    exec sp_who2

    Count the active connections
    exec sp_who2 active

    Hope this is what u want.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Funny how people equate MS SQL server and SQL dbs in general...


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Who's doing that?


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    bonkey wrote:
    Who's doing that?

    (Emphasis mine) :)
    the SQL command to ...
    SQL SERVER2000


Advertisement