Solved

DBCC Inputbuffer

Posted on 2008-06-12
7
970 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
ID: 21774205
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
ID: 21774270
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
ID: 21774388
right click the db, go to properties, then options...

you're welcome.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:ONYX
ID: 21781349
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
ID: 21781368
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
ID: 31466764
Excellent...thanks again for your help and patience.
0
 

Author Comment

by:ONYX
ID: 21781385
Thank you for all of your help.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

20 Experts available now in Live!

Get 1:1 Help Now