Results 1 to 9 of 9

Thread: Users

  1. #1
    Join Date
    Apr 2004
    Posts
    73

    Unanswered: Users

    Is there a way to get a list of users from SQL who are connected and using the database?

    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Users

    We'd need to know which DBMS product you are using.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54

    Re: Users

    Originally posted by andrewst
    We'd need to know which DBMS product you are using.
    <cynic>
    Gee, why would that be? There are only a few hundred commands and variations depending on the product/version used. Why not just list them all, and let thatdude try them until they find something that works?
    </cynic>

    -PatP

  4. #4
    Join Date
    Apr 2004
    Posts
    73
    The backend is SQL 2000 and the front end is MS Access 2000.

  5. #5
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    As I suspected, this was posted in the wrong forum. "SQL" != "Microsoft SQL Server". I will move it.

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Good call Tony!

    The command to list the currently logged in users for MS-SQL is:
    PHP Code:
    EXECUTE sp_who  -- basic informationno risk of blocking
    EXECUTE sp_who2 
    -- enhanced informationbut with risk of blocking 
    -PatP

  7. #7
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    I like sp_who2 because of all the hardware info
    i/o and such.

  8. #8
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by Ruprect
    I like sp_who2 because of all the hardware info i/o and such.
    I like the extra information too, but you can't always get what you'd like... When you have renegade blocking, sometimes you can't use sp_who2.

    -PatP

  9. #9
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    pat
    explain the term "renegade blocking" i am currently too lazy to research it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •