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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-11-24 : 07:52:10
|
| Daniel Cary writes "Is there a way to view a list of all the recently executed SQL statements for a particular sql server? I seem to remember doing this once before but can't seem to recall how I did it. I've seen third party tools that do this and I believe they are using a system stored procedure." |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-11-24 : 07:57:06
|
| If you go into your SQL Server menu in Windows, open an app called "profiler". That will do it while it is running.Otherwise you can use something like Lumingent's Log Explorer, but only for viewing that actual events that changed data, not every query that ran.Damian |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2003-11-24 : 08:10:21
|
| Is there not something called blackbox?....or tracebox which records the last 5MB (on a rolling basis) of SQL statements into a trace file on the server....I've seen statements re this recently on sqlservercentral.com (I shouldn't be visiting another SQL site....but I couldn't help myself)....but have not seen it in action. It may be a SQL2K facility. |
 |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2003-11-24 : 12:42:43
|
| Andrew is correct. Look up sp_trace_create in BOL.-Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime. |
 |
|
|
|
|
|