Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I View Active Transaction Details?

Status
Not open for further replies.

Kiehlster

MIS
Aug 14, 2000
147
US
We have one website that's been really putting the anvil on our sql2000 server and it only happens once in a blue moon, so it's really hard to track down or even worth our while to put much time into.

I was just wondering if there's some way I can view the full query that is being sent to the server when it decides to peg to 100% for hours. I can view the current process list and see what database it is and what type of query (SELECT) but I can't seem to find any way to view the exact details of that query. Is there some hidden place in the enterprise manager to view the currently active queries fully written out? If I can do that, I can probably find where that query is and reoptimize it or prevent it from happening in these rare conditions.

Steve Kiehl
Web Page Designer - Nanovox Productions
Fantasy Artist - Zeadi
 
Management > Current Activity > Process Info
Then right click the connection that is "pegging" the server and select properties. In that window it should show the last SQL command to run from that connection.

-kaht

How much you wanna make a bet I can throw a football over them mountains?
sheepico.jpg
 
That calls DBCC INPUTBUFFER( spid ) that returns only first 255 chars of last T-SQL batch... this may or may not be enough to determine where that query is.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top