Scripts & Questions

This page is both my page for all the links to useful script AND for any questions you want to post regarding Enterprise Manager, AWR Warehouse, Oracle Management Cloud and/or Database as a Service.  I’ll try to answer these questions for you, but do know I’m technical, but:

  1.  I’m not Oracle Support.  I can’t interfere with a solution that’s being worked on with these great folks in the support team.
  2. I’m not licensing or sales.  Trust me-  you don’t want to ask me deep licensing questions or costs.  I know nothing in regards to either… 🙂

So go for it, post a questions at the bottom of the page and Discus will email and let me know!


This is a collection of scripts that I’ve found useful over the years.  Please feel free to utilize any you would like and hopefully they will serve others as well as they have served me.  I have tried to ensure that if an author of the script is known, it is shown in the script.  You will see some that I’ve had for so long, I have no idea where the original source is from or even if it is in the original form, (vs. me having personalized it as I’ve gone along…) I have a tendency to utilize very generic, simple scripts and edit them to the needs of the specific situation. If you have a request for one of the ones here, just let me know!

AWR Warehouse Scripts, (NEW!!)

AWRW Top IO Waits


AWRW Analyze SQLID Data

AWRW Multiple Hash Plans for SQLID

CPU History by DBID

High Level AWR Data by DBID and Instance

Resource Allocation Scripts

Misc. Scripts

Dynamically Collecting Modified Object Stats
Check Rman Async
Check Mview Lag
Check DB Object Cache Info
Check for Data Dictionary Corruption
Set Sequence Cache
User Privilege Report
Check Ora Patch
DB Size
Datafile Space
Dynamic Index Monitoring Script
Check Index Monitoring
User Last Login
Locate Historical SQL_ID Info

RMAN Hot Backup Script for Easy Restores

RAC Schtuff
Global Cache Blocks Lost
Global Cache Corrupt Blocks

Long Operations
Library Cache Stats
Data Dictionary Hit
Duplicate SQL Search
Check Redo Size
Check Full Scans
Check Execs in Memory
Latch Check
Enqueue Waits
The Mutex Step Thru
Max Cursors
Redo Waits
AAS Expensive
AAS SQL Hist Stats
AAS High Var
AAS Exact
AAS Per Hour
AWR Per Minute
ASH Per Minute
Waits Aggregated

What’s in Undo
Find UNDO Blocks by SQL_ID
Dynamic Kill Sessions Script
Find Program from SQL_ID(or Hash)

Check Optimal Object Scans
Exadata Optimal Reads
ASM Cell Node Check

ASM Disk Info
View ASM Files

SQL Server
Check Process SQL
SQL Tuning Script by DB
Check Memory
Move SQL Server Logins
Query Waits
SQL Performance Stats
Dump the Stack Trace Data

ASH Queries, (NEW!)







Whats in the Ash Buffer
ASH CPU by User
ASH IO Waits
ASH Per Minute
ASH Wait for CPU
Tyler Muth ASH Resource Query

Script to email HTML AWR Report

AWR Streamlined Repository

I’ve been asked a couple times for this, so searched it out and added it here.  This is the DDL for a repository table to store data remotely/locally for the high level hourly data requests based off some wonderful queries from Karl Arao that we would email back and forth, discussing how we could make it into something *more*… 🙂


Hourly Report of AWR Data, identified by DB_ID, can then be used to report or fill into DDL created in table above.

Shell Script to load data

Explain Plans/Execution Plans

Get Explain Plans

Valuable ASH URLS

›Karl Arao:

›Tyler Muth:

›Kyle Hailey, John Beresniewicz, Graham Wood:


Questions and Recommendations for Blog Posts

Print Friendly
December 11th, 2009 by Kellyn Pot'Vin
  • Facebook
  • Google+
  • LinkedIn
  • Twitter