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 |
Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many
What do we need queues in sql service broker?
Tell me what are the advantages of using stored procedures?
Explain syntax for viewing trigger?
What is database architecture? : SQL Server Architecture
What is difference between line feed ( ) and carriage return ( )?
How to get the number of affected rows?
How to drop existing indexes in ms sql server?
What is xdr?
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
SQL stops working in every 15 days displaying message that database log file is full. Log file size is 3.95 GB. It is happening after shrinking the database also. What is solution to overcome this problem. Please help me as it's urgent.
Difference between Triggers and Stored Procedure
23 Answers Claimat, HCL, Protech, Silgate,