Oracle Database Enterprise Edition customers have the option of extending their functionality set via various optional ‘packs.’ One of the most popular packs is the Oracle Diagnostics Pack.
Funny, most people call it the ‘Diagnostic’ Pack, but it’s technically known as the Diagnostics Pack. Anyways, the pack includes a LOT of features. You can see all of them listed here.
Now in previous versions of Oracle SQL Developer, we have exposed a few of these features via several reports, including:
- ASH Report For the Past 30 Minutes
- ASH Rows Detail
- Daily ASH Statistics Chart
- Last AWR Report
In version v4.0 (new for Early Adopter 2!), we have greaty expanded the support for the Diagnostics Pack. But instead of building additional reports, we’ve created an entirely new Performance node in the DBA panel:
Before using any of these features, you’ll be asked to confirm that you do indeed have licensed said features.
There’s too much to go over in a single post here, but I’ll cover a few basic scenarios.
Running an AWR Report
The first thing you need to do is decide what time period you want to run the report against. AWR stands for Automatic Workload Repository. The repository contains performance and diagnostic stats for a period of time collected via snapshots. These snapshots are setup to be taken on a regular interval.
You can optionally create a baseline which is simply a pre-defined stand and end group of snapshots. These can be easier to reference than manually picking the start and end snapshot periods.
Now, what if you want to see what was going on for the past few minutes and there’s no snapshot to cover that activity? Well, you could go into the Active Session History (ASH) bits, but since we’re talking about AWR here, I’ll mention you can force a new snapshot to be taken on demand.
Simply open the Snapshots tree and right click.
Now with my snapshot newly created and available, I can go back to my AWR report viewer and select it.
Now hit the ‘Go’ button
The report will now be generated and displayed inside of SQL Developer. Since we can render basic HTML, it’s not an issue. You’ll find the in-report hyperlinks are navigable. But if you want a little nicer presentation, you can send the report to your default web browser using this button;
If you want a more permanent version of the report, you can also save it using the appropriate toolbar button. Hint, it’s the button that looks like a disk
I Want to Know More About A Particular Query
If I’m looking at my Top SQL portion of my AWR report, I can pull out a SQLID of note, and then feed that to the AWR SQL Report Viewer.
One More Thing
There’s nothing more frustrating than running a report only to notice it’s not the report you wanted. And instead of having to start completely over, you can simply use the ‘Toggle Inputs’ button and tweak your settings. Me likey A LOT. And I didn’t even ask for this bit, the developer came up with it himself. And why am I surprised….
I also like that the SQLID and Snapshot ‘pickers’ are smart enough to auto-scroll in the grid to that particular value. It’s these little things I think that will make the users happy. Having the reports is nice, but making them easy to generate and work with is what will bring them back.