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!
Resource Allocation Scripts
mem_chk.sql
mem_alloc.sql
Misc. Scripts
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
Performance
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
Troubleshooting
What’s in Undo
Find UNDO Blocks by SQL_ID
Dynamic Kill Sessions Script
Find Program from SQL_ID(or Hash)
Exadata
Check Optimal Object Scans
Exadata Optimal Reads
ASM Cell Node Check
ASM
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 CPU Time
ASH IO Waits
ASH Per Minute
ASH SQL_ID CPU Use
ASH SQL_ID Waits
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.
Explain Plans/Execution Plans
Valuable ASH URLS
Links I Find Valuable:
Tired of Searching for the 11.2.0.3.0 download? Click Here
Pingback: Redgate Webinar, “ASH and AWR Performance Data” | DBA Kevlar
Pingback: Performance Tuning with ASH and AWR Data – All Things Oracle