Oracle Scripts
List Oracle SQL Plan Baselines with DBA_SQL_PLAN_BASELINES
Nov 27, 2026 / · 9 min read · SQL Plan Management Execution Plans dba_sql_plan_baselines v$sql dbms_xplan dbms_spm dbms_output ·List Oracle SQL Plan Baselines with DBA_SQL_PLAN_BASELINES Purpose DBA_SQL_PLAN_BASELINES shows every plan that SQL plan management holds for the database: the statement it belongs to, how it got there, and whether the optimizer is allowed to use it. A SQL plan baseline is a set of accepted plans that the optimizer may …
Read MoreTest Index Changes Safely with Oracle Invisible Indexes
Test Index Changes Safely with Oracle Invisible Indexes Purpose An index has not shown up in a plan for months, and someone wants it gone. Dropping it is quick. Getting it back is not: you must re-create it, and for that you need the exact parameters of the original CREATE INDEX statement. If one month-end report did …
Read MoreView and Filter the Oracle Alert Log with ADRCI SHOW ALERT
View and Filter the Oracle Alert Log with ADRCI SHOW ALERT Purpose A text editor opens the whole alert log at once. tail -f on the log file shows new lines but can't filter them by meaning. A SQL query on V$DIAG_INFO tells you where the log lives, but not what it says. ADRCI, the ADR Command Interpreter, does all of …
Read MoreCheck Network ACL Privileges for a Host with DBA_HOST_ACES
Check Network ACL Privileges for a Host with DBA_HOST_ACES Purpose A UTL_HTTP call fails with ORA-24247: network access denied by access control list (ACL). This error has two causes. Either no access control list (ACL) is assigned to the target host, or the ACL does not grant the user the privilege needed to reach …
Read MoreMeasure the Library Cache Hit Ratio with V$LIBRARYCACHE Purpose V$LIBRARYCACHE contains statistics about library cache performance and activity, split by namespace. The script reads four counters for each namespace. They show how many times objects were pinned, how many of those pins found everything in memory, how …
Read MoreList Database Peak Usage with DBA_HIGH_WATER_MARK_STATISTICS
Oct 30, 2026 / · 9 min read · Database Usage dba_high_water_mark_statistics dba_feature_usage_statistics ·List Database Peak Usage with DBA_HIGH_WATER_MARK_STATISTICS Purpose DBA_HIGH_WATER_MARK_STATISTICS stores the peak value of a set of counters for database size and load. It also stores the value seen at the last sample. Each row is one statistic. Two examples are the maximum number of concurrent sessions (SESSIONS) …
Read MoreTrack Current Redo Log Usage with X$KCCCP
Oct 18, 2026 / · 11 min read · Oracle DBA Redo Log Internals X$ Fixed Tables ARCH Process v$log v$logfile v$log_history v$archive_processes x$kcccp ·Track Current Redo Log Usage with X$KCCCP Purpose V$LOG reports a redo log group's allocated size and its status, but it does not report how much of the CURRENT group has actually filled. On a busy instance, that is the number a DBA wants: is the current log close to a switch, or has it barely started filling? V$LOG …
Read MoreQuery Segment Advisor Recommendations with DBA_ADVISOR_FINDINGS
Oct 11, 2026 / · 10 min read · Oracle DBA Segment Advisor Advisor Framework dba_advisor_findings dba_advisor_tasks dba_advisor_recommendations dba_advisor_actions dbms_space user_advisor_findings ·Query Segment Advisor Recommendations with DBA_ADVISOR_FINDINGS Purpose Which segments are actually worth shrinking right now, and which recommendation is safe to act on without second-guessing it? Oracle already ran that analysis — usually overnight, during the default automatic maintenance window — and wrote the …
Read MoreQuery Historical ASH Beyond Memory with DBA_HIST_ACTIVE_SESS_HISTORY
Oct 7, 2026 / · 11 min read · Oracle DBA Active Session History AWR Retention ASH Sampling Oracle Performance dba_hist_active_sess_history v$active_session_history dbms_workload_repository ·Query Historical ASH Beyond Memory with DBA_HIST_ACTIVE_SESS_HISTORY Purpose Troubleshooting a performance spike after the fact is a different job than watching one happen live. By the time anyone opens a session the next morning to ask what was running during last night's batch window, the in-memory …
Read MoreAudit RMAN Backup Job History with V$RMAN_BACKUP_JOB_DETAILS
Sep 22, 2026 / · 11 min read · RMAN Reporting RMAN Backup History RMAN Backup Job Monitoring Backup Auditing V$ Dynamic Views v$rman_backup_job_details v$rman_output ·Audit RMAN Backup Job History with V$RMAN_BACKUP_JOB_DETAILS Purpose V$RMAN_BACKUP_JOB_DETAILS summarizes RMAN backup work at the job level. Oracle describes it as the view that "displays details about backup jobs." One row covers one job: when it started, when it ended, how much input it read, how much output it …
Read More