Oracle Utility Scripts Library — 356+ Production-Tested DBA Scripts
Oracle Utility Scripts Library
Section titled “Oracle Utility Scripts Library”This collection contains 356+ production-tested Oracle database utility scripts organized by category for easy navigation and reference.
Script Categories
Section titled “Script Categories” Performance Analysis (171 scripts) Performance monitoring, tuning, and troubleshooting — sessions, locks, latches, waits, I/O, SQL analysis, and resource usage
Schema Analysis (60 scripts) Table, index, and database object analysis for schema documentation, optimization, and DDL generation
Administration (46 scripts) DBA maintenance and management — health checks, space management, RMAN, jobs, storage, and invalid objects
Database Information (36 scripts) Database status, configuration, parameters, logs, archive analysis, and system information
SQL Generators (19 scripts) Template generators for common DBA tasks — truncate, drop, compile, grant, rebuild, and more
OEM Management (9 scripts) Oracle Enterprise Manager monitoring — blackouts, diagnostics, rules, and tablespace management
Security Analysis (7 scripts) User accounts, roles, privileges, and session analysis for security auditing and compliance
ASM Analysis (7 scripts) Automatic Storage Management — disk performance, disk groups, and capacity analysis
Most Popular Scripts
Section titled “Most Popular Scripts”| Script | Category | Purpose |
|---|---|---|
| gvsess.sql | Performance | Active session analysis across RAC instances |
| gvlock.sql | Performance | Lock analysis and blocking session detection |
| health.sql | Administration | Comprehensive database health check suite |
| ddbspacea.sql | Administration | Tablespace space usage with autoextend |
| dtable.sql | Schema | Table storage parameters and analysis |
| dinvalid.sql | Administration | Find and fix invalid database objects |
| db.sql | Database Info | Quick database overview and status |
| dprivall.sql | Security | Complete user privilege analysis |
Usage Guidelines
Section titled “Usage Guidelines”Before Running Any Script
Section titled “Before Running Any Script”- Review the script code — Understand what it does
- Check prerequisites — Ensure you have required privileges
- Test in development — Never run untested scripts in production
- Backup if needed — Some scripts may affect system state
Common Script Patterns
Section titled “Common Script Patterns”Most scripts follow these patterns:
- Prompt for parameters using
&variablesyntax - Use formatting commands for clean output
- Include column formatting for readability
- Filter results based on user input
Related Resources
Section titled “Related Resources” Oracle Error Resolution Guides (117 errors) Comprehensive troubleshooting guides for common Oracle errors with diagnostic queries and solutions
Database Health Check Guide Step-by-step guide to performing a complete Oracle database health assessment
Quick Start Guide Get up and running with Oracle DBA scripts — setup, configuration, and first scripts to run