Results 1 to 5 of 5

Thread: Database Lock

  1. #1
    Join Date
    Dec 2002
    Posts
    45

    Unanswered: Database Lock

    This week one of our databases had a lock and our DBA's claim they don't know why. Are there any logging techniques that can show us sql statistics or problem sql statements?

    Thanks,

    -Will

  2. #2
    Join Date
    Dec 2002
    Posts
    63

    Lightbulb

    Well the best way is to use the age old method of Sql Profiler. You can capture all sorts of things (RPCs, Queries etc.)to a table, and then sort it based on reads, writes, most frequently called, cpu utilization, whatever. BOL has great documentation on how to use profiler. Other ways to find out what is happening on your server is to run any of the following statements

    select * from master..sysprocesses
    sp_who2 active
    sp_who2
    dbcc inputbuffer (spid)

    Hope this helps

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Pigeon,

    What is the difference between sp_who and sp_who2? I see the proc in my master database, but a search of Books Online comes up empty and likewise Microsoft's knowledge base.

    blindman

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    sp_who2 gives more performance related data (cpu, and read columns). It also is nicer for us folks who cling to the Results in Text option, rather than the grid. I don't think sp_who2 is "supported" anymore, as MS wants folks to use Enterprise Manager to do everything.

  5. #5
    Join Date
    Dec 2002
    Posts
    63
    Ha ha... you know, I didnt know there was an sp_who. I have only used sp_who2. It looks as though Mcrowley is right, there is a little bit of different info in there. As far as it not being supported... well I have it now, and it seems to work well, so enjoy it while it lasts?

Posting Permissions

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