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
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 |
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 |
What is Pointer ?
3 Answers Cap Gemini, CarrizalSoft Technologies,
What is a View ? Can we insert, Update and delete a view?
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?
Is it safe to delete log files?
Diffrent types of function
what is cursor?why we will go to cursor?advantages &disadvantages of cursors?
What is sparse columns of sql server 2008?
How to change a login name in ms sql server?
What command would you use to add a column to a table in sql server?
What is a mixed extent?
what are the joins,primary key,foriegn key, candidate key, super key and expain them?
How to filter out duplications in the returning rows in ms sql server?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)