Oracle Session Snapper v3.10

Now as I’m done with the awesome Hotsos Symposium (and the training day which I delivered) and have got some rest, I’ll start publishing some of the cool things I’ve been working on over the past half a year or so.

The first is Oracle Session Snapper version 3!

There are some major improvements in Snapper 3, like ASH style session activity sampling!

When you troubleshoot a session’s performance (or instance performance) then the main things you want to know first are very very simple:

Which SQL statements are being executed

What are they doing, are they working on CPU or waiting.

If waiting, then for what

Often this is enough for troubleshooting what’s wrong. For example, if a session is waiting for a lock, then wait interface will show you that. If a single SQL statement is taking 99% of total response time, the V$SESSION (ASH style) samples will point out the problem SQL and so on. Simple stuff.

However there are cases where you need to go beyond wait interface and use V$SESSTAT (and other) counters and even take a “screwdriver” and open Oracle up from outside by stack tracing :-)

When I wrote the first version of Snapper for my own use some 4-5 years ago I wrote it mainly having the “beyond wait interface” part in mind. So I focused on V$SESSTAT and various other counters and left the basic troubleshooting to other tools. I used to manually sample V$SESSION/V$SESSION_WAIT a few times in a row to get a rough overview of what a session was doing or some other special-purpose scripts.

However after Snapper got more popular and I started getting some feedback about it I saw the need for covering more with Snapper, not just the “beyond wait interface” part, but also the “wait interface” and “which SQL” part too.

So, now I’m presenting Snapper v3 which does all the 3 points above using ASH style V$SESSION sampling and it still has the first step to “beyond wait interface” part in it, which is very useful for advanced performance troubleshooting and diagnosis – I’m talking about the V$SESSTAT counters above.

I’ve made some syntax changes in Snapper too and right now the v3 doesn’t work on Oracle 9.2 (it will work some day :)

To give you an idea of the new ASH style sampling capabilities, heres some example output:

P.S. People who attended Hotsos Symposium Training Day where I demoed the initial version of Snapper v3 – download the new version from above link (v3.10), it’s much more flexible than the one I demoed couple of weeks ago!

NB! If you want to move to the "New World" - offload your data and workloads to Hadoop, without having to re-write your existing applications - check out Gluent. We are making history! ;-)

10 Responses to Oracle Session Snapper v3.10

I can’t wait to give Snapper 3 a try.
Your training day at the Hotsos Symposium was pure gold. I learned a lot from your logical approach. Snapper, and the rest of your helpful scripts, will receive a permanent spot in my Oracle tool bag.
Thanks a bunch for making all this available!

@Christoph
Thanks Christoph! Glad to hear that other people also like this stuff as much as I do :-)

About Snapper v3.10, I haven’t thoroughly tested it on Oracle 10.1 yet, so there may be some glitches, but I’m setting up a 10.1 env in a day or two for further testing… Anyway if there are any issues, please let me know.

Man, since I have become a contractor in 2007 I have been so bogged down I haven’t been able to make a single Hotsos symposium! I’m so bummed to have missed it! Any chance of putting your presentation up for download? I think I am going to request off for it next year. with this much notice I’ve got to be able to take the time off!

Thank you! I’ll be testing the new version of snapper in a 10.2.0.4 environment today (already working on a production problem). Also thank you for your training day at Hotsos. I really learned a lot about how to approach Oracle performance issues which I tend to forget from time to time and the scripts you provided are excellent. I’m sure my sql and plsql programming will also get better after learning the code in your scripts.

@Steve
You shouldn’t set SQLPATH on a server anyway, my scripts are meant as client side scripts. As far as failures go, anything you do may help you or cause trouble so it’s YOUR task to test and verify any new tool, script or technique you use, do not take anybody’s word for it!

Just got back from the SOUG presentation. This was one of the most valuable session’s I have attended in a long time. I am looking forward to working with your scripts! Thanks for the great presentation!