Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kkr12
Starting Member
12 Posts |
Posted - 2006-06-01 : 16:24:15
|
| Hi, How do we find a query which is being exceuted by a particualr connection in sqlserver ? I'm new to sqlserver and I know there are lot of ways in Oracle. But not sure how do I find the query which is being executed by a session . Please help me.Thanks,kkr. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-06-01 : 16:26:00
|
| If you know the spid, which can be found by running sp_who in Query Analyzer, sp_who2 in Query Analyzer, or Current Activity in Enterprise Manager, then you can run:DBCC INPUTBUFFER(SpidNoGoesHere)If you don't know the spid, then you'll need to start up SQL Profiler to capture the activity.Tara Kizeraka tduggan |
 |
|
|
|
|
|