Back to Performance Tuning md

Readme ADB

oracle_dba_perf_toolkit/adb_performance_tuning/README_ADB.md

Disclaimer: This script is provided for educational and learning purposes. Review it carefully, test in a non-production environment, confirm privileges, and validate impact before using it in production.
# ADB Performance Tuning Kit

This directory contains Autonomous Database-focused versions of core performance scripts.

## Important Access Note

In many ADB environments, non-ADMIN users do **not** have direct access to catalog/performance views (`V$`, `DBA_HIST_*`, etc.).
Also, direct access to `SYS`/`X$` objects is typically restricted in Autonomous Database.

- If you don't have those privileges, many scripts here will fail with `ORA-00942`.
- Use `00_adb_access_check.sql` first to verify what is accessible.

## Run

- Full run: `@run_adb_performance_tuning.sql`
- Or run any script individually.

## Privilege Requirements

- `SYS`/`X$` direct querying is out of scope for this kit (ADB restriction).
- `01` to `07`, `10`, `11` require `V$` access.
- `08` and `09` additionally require `DBA_HIST_*` (AWR) access.
- Recommended: run as `ADMIN` user in ADB.

## Script Map

0. `00_adb_access_check.sql` : checks if `V$` and `DBA_HIST_*` are accessible.
1. `01_adb_current_db_response_metrics.sql` : current DB response KPIs.
2. `02_adb_top_sql_response_speed.sql` : top SQL latency and rows/exec.
3. `03_adb_current_wait_profile_ash.sql` : recent ASH wait profile.
4. `04_adb_top_wait_events.sql` : top non-idle waits.
5. `05_adb_temp_usage_by_session.sql` : TEMP consumers.
6. `06_adb_undo_risk_active_sql.sql` : active SQL vs undo retention risk.
7. `07_adb_alert_log_errors_last_n_hours.sql` : alert-log ORA errors by hour window.
8. `08_adb_historical_db_response_metrics.sql` : historical DB response trend (AWR).
9. `09_adb_historical_sql_response_for_sql_id.sql` : historical SQL speed by SQL_ID (AWR).
10. `10_adb_ash_bottleneck_analyzer.sql` : ASH bottleneck summary.
11. `11_adb_executive_summary.sql` : quick GREEN/YELLOW/RED health summary.