Sunday, 18 July 2021

SQL Script Repository

 Please  download scripts from this SQL Script Repository


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 VersionScriptPurpose
19ccheck_patches_19.sqlCheck applied RUs and RURs with CDB_REGISTRY_SQLPATCH
18ccheck_patches_18.sqlCheck applied RUs and RURs with CDB_REGISTRY_SQLPATCH
12.1, 12.2
check_patches.sqlMonitor applied PSUs, BPs, RUs, RURs with DBA_REGISTRY_SQLPATCH
12.1, 12.2, 18c, 19c
check_components.sqlChecks all installed components CDB-wide with DBA_REGISTRY
12.1, 12.2, 18c, 19c
check_inv_objs.sqlChecks all invalid objects CDB-wide
11.2, 12.1, 12.2, 18c, 19c
capture_awr.sqlCapture 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, 18c, 19c
capture_cc.sqlCapture 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.
19c and belowspa_cpu.sqlRun a full SQL Performance Analyzer task on captured SQL Statements – compare on CPU
19c and belowspa_buffer.sqlRun a full SQL Performance Analyzer task on capture SQL Statements – compare on buffer gets
19c and belowspa_elapsed.sqlRun a full SQL Performance Analyzer task on capture SQL Statements – compare on elapsed time
19c and below
spa_report_cpu.sql
Generate a regressed report comparing two workloads based on CPU
19c and belowspa_report_buffer.sql
Generate a regressed report comparing two workloads based on buffer gets
19c and belowspa_report_elapsed.sql
Generate a regressed report comparing two workloads based on elapsed time

 

0 comments:

Post a Comment