Oracle Scripts
Track 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 MoreWatch Long-Running SQL in Real Time with V$SQL_MONITOR
Watch Long-Running SQL in Real Time with V$SQL_MONITOR Purpose An AWR report describes what happened over the last hour. A SQL trace file describes what happened after the statement has already finished writing it. V$SQL_MONITOR answers a different question: what is running right now, and how far along is it. …
Read MoreRedefine a Table Online with DBMS_REDEFINITION, No DML Blocking
Redefine a Table Online with DBMS_REDEFINITION, No DML Blocking Purpose A DBA moving a table to a new tablespace, adding compression, or rebuilding a badly fragmented segment has one hard requirement: users can't lose access to that table while the change is happening. For decades the available tools — CREATE TABLE AS …
Read MoreGet the Actual Execution Plan with DBMS_XPLAN.DISPLAY_CURSOR
Sep 13, 2026 / · 10 min read · Oracle DBA DBMS_XPLAN DISPLAY_CURSOR Execution Plans GATHER_PLAN_STATISTICS Cursor Cache SQL Tuning Oracle Performance V$SQL_PLAN v$sql ·Get the Actual Execution Plan with DBMS_XPLAN.DISPLAY_CURSOR Purpose EXPLAIN PLAN never runs the statement it describes. It asks the optimizer what it would do, based on statistics and cardinality estimates, and prints that guess — which is exactly why a query that looks fine in EXPLAIN PLAN can still run slow in …
Read MoreManage the Recycle Bin with DBA_RECYCLEBIN
Sep 6, 2026 / · 9 min read · Oracle DBA DBA_RECYCLEBIN Recycle Bin PURGE Statement Flashback Table Dropped Objects USER_RECYCLEBIN Oracle Administration ·Manage the Recycle Bin with DBA_RECYCLEBIN Purpose Where does a table actually go the instant DROP TABLE runs? Not straight to disk deallocation. Since Oracle Database 10g, a dropped table is renamed and moved into the recycle bin instead of being physically removed, and it stays there, fully intact, until something …
Read MoreMove a Datafile Online with ALTER DATABASE MOVE DATAFILE
Aug 28, 2026 / · 11 min read · Oracle DBA ALTER DATABASE Move Datafile Online Datafile Move OMF Oracle 12c Datafile Management Oracle Administration dba_data_files v$datafile ·Move a Datafile Online with ALTER DATABASE MOVE DATAFILE Purpose Oracle 12.1 closed a gap that had existed since the earliest releases: moving or renaming a datafile always meant taking something offline first. A DBA had three choices — switch the tablespace offline, switch the individual datafile offline, or shut the …
Read MoreFlush the Shared Pool and Buffer Cache with ALTER SYSTEM
Flush the Shared Pool and Buffer Cache with ALTER SYSTEM Purpose Where DBMS_SHARED_POOL.PURGE removes one cursor or one package from the library cache, ALTER SYSTEM FLUSH SHARED_POOL clears every parsed statement, stored procedure, function, package, and trigger cached in the shared pool at once — a blunt instrument …
Read More