How can I know what query is executing by by a particural
user? (using sp id or any othe way.)

Answer Posted / prem

DBCC INputbuffer(spid)- Displays the last statement sent
from a client to an instance of Microsoft SQL Server 2005.

First 256 characters only will be displayed.


SQL statements can also be captured by running a profiler.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Find columns used in stored procedure?

704


What is attribute relationships, why we need it? : sql server analysis services, ssas

675


What is the difference between ‘having’ clause and a ‘where’ clause?

768


Does sql server use t sql?

726


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

706






You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

677


What is the openxml statement in sql server?

730


You want to implement the one-to-many relationship while designing tables. How would you do it?

709


Which are new data types introduced in sql server 2008?

808


Is BCNF better than 2NF & 3NF? Why?

801


Is sql server a database?

696


Does server sql treat char as a variable-length or fixed-length column?

786


What is the contrast amongst drop and truncate?

755


How to execute a sql statement using odbc_exec()?

744


What are commonly used odbc functions in php?

725