Solved

DBCC Inputbuffer

Posted on 2008-06-12
7
974 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Move SQL 2005 Express to Server 2012R2 19 166
Query to Add Late Tolerance 10 82
SQL Server: SNAPSHOT replication to include a newly added table. 2 34
View SQL 2005 Job package 16 77
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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