Results 1 to 6 of 6

Thread: Status Querys

  1. #1
    Join Date
    Jun 2007
    Posts
    4

    Status Querys

    I just started working with MS SQL. I'm attempting to find the equivalent of the MySQL commands STATUS and SHOW STATUS.

    Essentially, I want to connect to the database from a .net app, check the status, such as how many connections, table locks, errors, etc... and display that information on my application.

    Any recommendations?

  2. #2
    Join Date
    Jun 2007
    Posts
    4

    Answer to my own question

    After a little bit of digging and searching, I found some things that help me:

    sp_who
    sp_lock

    and

    select * from master.dbo.sysprocesses


    If you know any other commands along these lines, let me know. Thanks

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    You can find more in sql books online.

  4. #4
    Join Date
    Jun 2007
    Posts
    4

    links?

    Any specific links in the books online? I've been searching them and coming up with very little helpful stuff. I must admit, I'm much more a fan of the MySQL documentation. It has a much better flow and ease of use to it.

  5. #5
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    It should be installed together with your SQL client. There is a copy in MSDN as well.

  6. #6
    Join Date
    Jun 2007
    Posts
    2
    If this is 2005, you should be using the new system dynamic management views...can check msdn online as well as books online.

    For e.g.
    SELECT s1.cpu_time,s1.sql_handle,s2.text, * FROM master.sys.dm_exec_requests s1 outer APPLY sys.dm_exec_sql_text(sql_handle) AS s2
    order by s1.cpu_time desc

Posting Permissions

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