Skip to content

Utility Scripts Overview

This collection contains 35+ production-tested Oracle database utility scripts organized by category for easy navigation and reference.

Basic database and instance information scripts for quick health checks and system overview.

DBA maintenance and management scripts including invalid objects, scheduled jobs, and storage management.

Table, index, and database object analysis scripts for schema documentation and optimization.

Performance monitoring, tuning, and troubleshooting scripts including locks, latches, and resource usage.

User account, role, and privilege analysis scripts for security auditing and compliance.

Automatic Storage Management scripts for ASM disk and configuration analysis.

  1. Review the script code - Understand what it does
  2. Check prerequisites - Ensure you have required privileges
  3. Test in development - Never run untested scripts in production
  4. Backup if needed - Some scripts may affect system state

Most scripts follow these patterns:

  • Prompt for parameters using &variable syntax
  • Use formatting commands for clean output
  • Include column formatting for readability
  • Filter results based on user input

Find specific functionality:

  • Locks and blocking → Performance Analysis section
  • Invalid objects → Administration section
  • Table analysis → Schema Analysis section
  • User permissions → Security Analysis section
  • ASM storage → ASM Analysis section

Most commonly used scripts:

  • db.sql - Quick database overview
  • gvinst.sql - Instance status (RAC)
  • gvlock.sql - Lock analysis
  • dinvalid.sql - Find invalid objects
  • dtable.sql - Table storage parameters

Start exploring with the scripts that match your immediate needs!