Skip to content

Oracle Data Dictionary Views - Complete Reference with SQL Examples

The Oracle data dictionary is a collection of read-only views that provide metadata about the database structure, performance, and activity. These views are essential tools for every Oracle DBA — from real-time performance troubleshooting to capacity planning and security auditing.

Dynamic performance views are built on top of internal memory structures (X$ tables) and provide real-time information about the running instance. They reset when the instance restarts.

ViewDescription
V$SESSIONAll current sessions — the starting point for most performance investigations
V$SQLEvery SQL statement cached in the shared pool with execution statistics
V$SQL_PLANCached execution plans for SQL statements
V$SQL_MONITORReal-time monitoring of long-running SQL statements
V$ACTIVE_SESSION_HISTORYSecond-by-second ASH sampling for recent performance analysis
ViewDescription
V$SYSSTATSystem-wide cumulative statistics (buffer cache hit ratio, parse stats, I/O)
V$SYSTEM_EVENTAggregate wait event statistics across the instance
V$WAITSTATBuffer busy wait breakdown by block class
V$METRICReal-time performance metrics (DB time/sec, I/O throughput, transaction rate)
ViewDescription
V$SESS_TIME_MODELPer-session DB time breakdown (CPU vs wait vs parse)
V$SYS_TIME_MODELSystem-wide DB time hierarchy and parse analysis
ViewDescription
V$LOCKAll enqueue locks held and requested — blocking lock analysis
V$LOCKED_OBJECTWhich tables are locked and by which sessions
V$TRANSACTIONActive transactions with undo usage and redo generation
ViewDescription
V$SGASGA memory component sizes and resize history
V$PGASTATPGA memory usage, cache hit ratio, and over-allocation
V$PGA_TARGET_ADVICEPGA sizing advisor for tuning PGA_AGGREGATE_TARGET
V$PROCESSOS process details and per-process PGA memory
V$OSSTATOS-level CPU, memory, and load statistics
ViewDescription
V$PARAMETERCurrent instance parameter values including hidden parameters
SELECT sid, serial#, username, sql_id, event,
seconds_in_wait, blocking_session, status
FROM v$session
WHERE status = 'ACTIVE' AND username IS NOT NULL;
SELECT sql_id, elapsed_time/1e6 as elapsed_sec,
cpu_time/1e6 as cpu_sec, executions, buffer_gets
FROM v$sql
ORDER BY elapsed_time DESC FETCH FIRST 10 ROWS ONLY;
SELECT l1.sid as blocker, l2.sid as waiter,
l1.type, l2.ctime as wait_seconds
FROM v$lock l1, v$lock l2
WHERE l1.block = 1 AND l2.request > 0
AND l1.id1 = l2.id1 AND l1.id2 = l2.id2;

Additional view categories are being documented:

  • Storage Views — DBA_TABLESPACES, DBA_DATA_FILES, DBA_SEGMENTS, DBA_FREE_SPACE
  • Schema Views — DBA_TABLES, DBA_INDEXES, DBA_OBJECTS, DBA_CONSTRAINTS
  • Security Views — DBA_USERS, DBA_ROLES, DBA_SYS_PRIVS, DBA_TAB_PRIVS
  • RAC Views — GV$ views for multi-instance monitoring
  • Multitenant Views — CDB_ and PDB_ views for container databases
  • Audit Views — UNIFIED_AUDIT_TRAIL, DBA_AUDIT_TRAIL