Scripts

SQL Script Repository - Upgrade Your Database - NOW!SQL Script Repository

Please  download scripts from this SQL Script Repository – Upgrade Your Database – NOW!.

The scripts get used in various blog posts to monitor or diagnose things in Oracle databases. Click on the script’s name below to download the script. And please report any issues to me as well.

DB Version Script Purpose
12.1, 12.2 check_patches.sql Monitor applied PSUs and BPs from DBA_REGISTRY_SQLPATCH and REGISTRY$HISTORY
12.1, 12.2 check_components.sql Checks all installed components CDB-wide with DBA_REGISTRY
12.1, 12.2 check_inv_objs.sql Checks all invalid objects CDB-wide
11.2, 12.1, 12.2  capture_awr.sql Capture statements from AWR – uses the oldest and newest available snapshot by default and limits to 5000 statements by elapsed time.
11.2, 12.1, 12.2   capture_cc.sql Capture statements from Cursor Cache – uses a conservative test setting for 30 seconds only polling the CC every 5 seconds – needs to be adjusted for live systems.