DBCC Inputbuffer

I'm trying to troubleshoot a SQL issue. I know it's a blocking issue in SQL 2005...so I go do the following:

1) sp_who2
2) I find the spid that is causing the block and do an DBCC Inputbuffer(spid)

The issue with this is that it only displays 256 characters. So, I'll only see part of a SQL Query and it truncates. Is there another tool or some kind of parameter I could put on this command so that the results aren't truncated?

Thanks
ONYXAsked:
Who is Participating?
 
chapmandewConnect With a Mentor Commented:
Is an issue with dbcc inputbuffer(or was)...might be fixed w/ SP2.

At any rate, try this instead...make sure your db compt. level is set to 90

  select text from sys.dm_exec_requests r  cross apply sys.dm_exec_sql_text(sql_handle)  
where session_id = yourspidfromspwho
0
 
ONYXAuthor Commented:
We do have SP2. How can I find out wha tthe db compt level is set to?

I will also try your query. Thank you.

0
 
chapmandewCommented:
right click the db, go to properties, then options...

you're welcome.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
ONYXAuthor Commented:
Awesome! Thank you so much for your help. This is out of the scope of this question, but what's the difference between using JOIN and APPLY in a SQL Statement...it seems as though they accomplish similiar tasks.
0
 
chapmandewCommented:
No problem....the APPLY is new to 2005 and is used to pass values from a table or view as parameters into a table-valued function (which you can't do w/ a JOIN operator)
0
 
ONYXAuthor Commented:
Excellent...thanks again for your help and patience.
0
 
ONYXAuthor Commented:
Thank you for all of your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.