Results 1 to 6 of 6
  1. #1
    Join Date
    May 2002
    Posts
    73

    Unanswered: SQL Server connections

    Hello,

    I would like to know if there is a command for SQL Server 2000 to know the existing connections to given database in real time

  2. #2
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    There isn't that I know of without using Performance Monitor. Perfmon has a counter for this though.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  3. #3
    Join Date
    Jul 2004
    Posts
    52
    This will return the counts of connections per database.

    select db_name(dbid) dbname, count(1) connections
    from master..sysprocesses
    group by dbid

  4. #4
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    ?? Many times a connection can take up multiple processes, each having a row in sysprocesses.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  5. #5
    Join Date
    Jul 2004
    Posts
    52
    Really? I didn't know that.

  6. #6
    Join Date
    May 2002
    Posts
    73

    real time connections

    Thanks, The problem is that my application inserts records to a SQL 2K database. For some reason the database has multiple records with same timestamp, etc. I want to know why the same record is being duplicated. I think that other connections are creating or inserting same record at the same time.

    regards,

Posting Permissions

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