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 |
Define indexes?
What are the advantages of using stored procedures? Please don't simply say compilation time will be saved as they are already complied. Please specify some other advantages.
What is the difference between ddl,dml and dcl commands?
0 Answers BirlaSoft, Verifone,
Can group functions be used in the order by clause in ms sql server?
How to retrieve range of 10th rows to 20 th rows from total rows from a database table.? (Not from Dataset)
10 Answers Cognizant, Infosys,
How to create a dml trigger using create trigger statements?
After using delete statement in sql query to delete some records...to retrieve the deleted records we can get using rollback command but till that where it stores means particular location name i need....(after deleting and rollback )
3 Answers CarrizalSoft Technologies, iGate,
Explain stored procedure?
What are different types of constraints?
What is user-defined scalar function?
What is a periodical index?
How to create logins using windows Authentication mode?