I received a question about why Trace Files are useful.
I jotted down a few quick points. I may expand on them or add to them later
- You don’t have to monitor a user screen , batch job in real time – e.g. if the user or batch is running at 2am, you’d have to login at 2am to monitor it.
- If you are doing real time monitoring, once the particular event of interest has gone off your screen, you don’t have time to think about it because something else is happening on the screen you are using to monitor the user / batch
- ASH doesn’t capture every wait event — you’ll have many single block reads and multi block reads and even locks that may have occurred between two 1second AWR snapshots. So it is an approximation but not an aggregation. (Historical AWR is even worse as it maintains only 1 in 10 samples)
- You can repeatedly review the tracefile and spend more time on it which you can’t do in real-time monitoring
- I’d use a trace file for a batch job.