Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2011
    Posts
    3

    Unanswered: Monitoring SQL Server

    Hi
    I want to monitor my SQL Server.

    Scenario:
    There is only one Username and Hundreds of Users connecting from different machines on same server.

    I want to Monitor :

    Machine Name of the User from He connected the SQL Server.

    Any way?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    A lot depends on what version of SQL Server you're using and what tools the client machines are using to connect to your SQL Server. You can probably get by with just:
    Code:
    SELECT hostname
       FROM master.dbo.sysprocesses
       WHERE  50 <= spid
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Dec 2011
    Posts
    3
    SELECT hostname
    FROM master.dbo.sysprocesses
    WHERE 50 <= spid

    Does this possible to fetach this all info through Date and time?

  4. #4
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    SQL Server Profiler
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by wasi_shez View Post
    Does this possible to fetach this all info through Date and time?
    Please re-phrase this question. I don't understand.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  6. #6
    Join Date
    Dec 2011
    Posts
    3
    I mean if i want to put the filter on the same query of Date or time

    then?

  7. #7
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The master.dbo.sysprocesses table shows the conditions of the connections to this server at this particular instant. It shows when that connection logged in (was created), and when the last batch was submitted from the client to the server.

    You can not query master.dbo.sysprocesses to see what happened six hours, days, months, etc ago. It only shows sessions that are connected to the server right now.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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