Solved

DBCC Inputbuffer

Posted on 2008-06-12
7
969 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:ONYX
  • 4
  • 3
7 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 50 total points
Comment Utility
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
 

Author Comment

by:ONYX
Comment Utility
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
 
LVL 60

Expert Comment

by:chapmandew
Comment Utility
right click the db, go to properties, then options...

you're welcome.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:ONYX
Comment Utility
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
 
LVL 60

Expert Comment

by:chapmandew
Comment Utility
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
 

Author Closing Comment

by:ONYX
Comment Utility
Excellent...thanks again for your help and patience.
0
 

Author Comment

by:ONYX
Comment Utility
Thank you for all of your help.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now