SQL Server Performance

What SQL is running

Discussion in 'Performance Tuning for DBAs' started by kellykday, Sep 13, 2005.

  1. kellykday New Member

    Hello,

    I have been asked to help out with some dba duties on SQL Server 2000 which I'm not all that familiar with. I am the DBA for our Oracle databases. My question is - how can you check what sql is running in a sql server database? In Oracle I am able to run a script using the v$ tables to see what sql statements are being executed. Is there something comparable in SQL Server?

    Thanks!

  2. merrillaldrich New Member

    I don't think you can do it in one step, but you can

    execute sp_who

    then

    dbcc inputbuffer ( processid )

    for each processid

    --------------------------
    Yes, I am a geek. I know. I can't help it.
  3. Luis Martin Moderator

    Also you can run Profiler.

    Luis Martin
    Moderator
    SQL-Server-Performance.com

    One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important
    Bertrand Russell


    All postings are provided “AS IS” with no warranties for accuracy.



  4. FrankKalis Moderator

    Maybe a start might also be to check 'Current Activity' in Enterprise Manager. You'll find this under the 'Management' tree. Basically this is the GUI driven version of what merrillaldrich suggested. I would see if this is good enough for you. And if not, look at Profiler or server-side traces.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    http://www.insidesql.de
    Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)
  5. satya Moderator

Share This Page