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

What is Pointer ?

3 Answers   Cap Gemini, CarrizalSoft Technologies,


What is a View ? Can we insert, Update and delete a view?

0 Answers   Arigo Infotech,


if 3 duplicate records in table,i want to delete 2 alternating duplicate records by keeping 1 duplicate and 1 original as it is,how?

2 Answers  


Is it safe to delete log files?

0 Answers  


Diffrent types of function

1 Answers   Wipro,


what is cursor?why we will go to cursor?advantages &disadvantages of cursors?

1 Answers  


What is sparse columns of sql server 2008?

0 Answers  


How to change a login name in ms sql server?

0 Answers  


What command would you use to add a column to a table in sql server?

0 Answers  


What is a mixed extent?

0 Answers  


what are the joins,primary key,foriegn key, candidate key, super key and expain them?

6 Answers   Polaris,


How to filter out duplications in the returning rows in ms sql server?

0 Answers  


Categories