Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / suvendu

SELECT *
FROM Master.dbo.sysprocesses
WHERE DBID NOT IN (1,2,3,4) -- Master, Tempdb, Model, MSDB
AND spid > 50
ORDER BY spid DESC

Is This Answer Correct ?    2 Yes 0 No

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

Answer / 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

More SQL Server Interview Questions

Why the trigger fires multiple times in single login?

0 Answers  


Explain about SQLOS?

0 Answers  


How do I start sql server 2016?

0 Answers  


What are Sql Reporting Services and analysis services? Can u Explain

1 Answers  


What is log cache in sql server?

0 Answers  


What is database replication?

0 Answers  


how we can store the value like that 001,003,023 etc in sql server 2005

7 Answers  


List some major differences between triggers and stored procedures?

0 Answers  


What is a natural primary key?

0 Answers  


What is meant by indexing files?

0 Answers  


How to get a list of columns using the "sp_help" stored procedure in ms sql server?

0 Answers  


How can I create a table from another table without copying any values from the old table?

3 Answers  


Categories