March 12, 2010 at 10:07 am
I need to find out what SQL is running under a user's ID. Is ther eany dynamic view for this. I need to actually get to the user ID not just the spid and capture the actual SQL statement that is being run.
Any help would be greatly appreciated.
SD KHAN
March 12, 2010 at 10:12 am
I use traces for that kind of thing.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 12, 2010 at 11:08 am
Yep. SQL Server Profiler.
March 12, 2010 at 3:29 pm
Yep SQL Profiler will be your best bet. Under the trace template you can filter by the login name and see what that specific user is executing.
March 12, 2010 at 3:35 pm
You can also use activity monitor if you know when exactly user is running SQL, Profiler is your best bet.
March 12, 2010 at 3:43 pm
profiler
trace
sp_who2 (if they are running it currently)
those are a few options.
Also check out the article from yesterday (I have used this in the past to do the same sort of thing.
http://www.sqlservercentral.com/articles/Log+growth/69476/
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply