Is it possible to use SQL 2005 Server profiler to run a trace for queries that happened for example 6 hours ago? Or is trace only used for real time? I'm trying to find a way to view old TSQL queries. Is this possible with SQL 2005?
|
feedback
|
|
Trace is real time only, although if you want to do some auditing on your database in the future, you might want to set up triggers. http://msdn.microsoft.com/en-us/library/ms189799.aspx | |||
|
feedback
|
|
Profiler captures realtime events, so past events are gone. You can have some past informations looking into the procedure cache, but this isn't the complete log of queries:
| |||
|
feedback
|