Solved

DBCC Inputbuffer

Posted on 2008-06-12
7
971 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

803 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