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 difference between index and primary key?
what is syntex second or third highest salary. thanks & Regards Dhirendra sinha
How many types of Outer Joins?What are they?
What is stored procedures?
what is database replicaion? What are the different types of replication you can set up in sql server? : Sql server database administration
Find first and last day of current month in sql server
I have student marks in a student table. I need second highest mark .Then what will the query for this?
37 Answers NetCore, Patni, SAP Labs, Temenos, Wipro,
What is Transaction?
How do you know which index a table is using?
Is sql different from sql server?
if a parameter is not send to a stored procedure what type of identifier is to be used in Stp and if that parameter is not feed to the a query inside the Stp how to validate with out useing IF condition
Does windows server 2016 come with sql server?
Oracle (3253)
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)