Oracle Scripts
Find Oracle Archive Logs Older Than N Days with find -mtime
May 3, 2026 · 5 min read · Oracle Database Archive Logs Unix Commands Database Maintenance Oracle DBA Storage Management Archived Redo Logs find ·Find Oracle Archive Logs Older Than N Days with find -mtime Purpose Oracle databases in archivelog mode write a stream of .ARC (archived redo log) files to a destination directory. The directory fills up. When it fills up, the database hangs. The four find -mtime commands below let a DBA list, delete, compress, or move …
Read MoreWrite Text Files from Oracle PL/SQL with UTL_FILE Example
May 2, 2026 / · 5 min read · Oracle Database PL/SQL UTL_FILE File I/O Oracle DBA Database Programming Directory Object Stored Procedures ·Write Text Files from Oracle PL/SQL with UTL_FILE Example Purpose UTL_FILE is the built-in Oracle PL/SQL package for reading and writing operating-system files from inside the database. The procedure below — taken straight from the shutdownabort.com DBA Quick Guides (Andrew Barry, 2007–2013, preserved via the Wayback …
Read MoreSample tnsnames.ora Dedicated Server Entry (with ASM)
May 1, 2026 / · 5 min read · Oracle Database SQL*Net tnsnames.ora Oracle Net Oracle DBA Database Connectivity ASM TNS ·Sample tnsnames.ora Dedicated Server Entry (with ASM) Purpose The tnsnames.ora file is the client-side address book for Oracle Net. Each entry maps a short alias (SCR9) to a full network address — protocol, host, port, and target service. Without a working tnsnames.ora entry, sqlplus, rman, and any application using …
Read MoreSample listener.ora with Static SID_LIST and Extproc
Apr 30, 2026 / · 6 min read · Oracle Database SQL*Net listener.ora Oracle Net Oracle DBA Database Connectivity extproc Listener ·Sample listener.ora with Static SID_LIST and Extproc Purpose The listener.ora file is the server-side configuration for the Oracle Net listener — the process that accepts incoming client connections and hands them off to a database server process. The sample below — taken straight from the shutdownabort.com DBA Quick …
Read MoreDelete the 500 Oldest Files in a Directory (Oracle DBA)
Apr 29, 2026 / · 5 min read · Oracle Database Unix Commands Oracle DBA Trace Files Audit Files Database Maintenance Storage Management Diagnostic Dest ·Delete the 500 Oldest Files in a Directory (Oracle DBA) Purpose Oracle's diagnostic destination (DIAGNOSTIC_DEST), audit file destination (AUDIT_FILE_DEST, also known as adump), and per-process trace directories collect thousands of small files over time. Inode counts, not bytes, are usually the limit that bites first …
Read MoreList Files Opened by an Oracle Process with lsof -p
Apr 28, 2026 / · 5 min read · Oracle Database Unix Commands Oracle DBA lsof Process Diagnostics File Handles Troubleshooting Background Processes ·List Files Opened by an Oracle Process with lsof -p Purpose lsof (LiSt Open Files) is the UNIX tool for inspecting which processes have which files open. For an Oracle DBA it is the fastest answer to four common questions: which datafiles is this server process touching, which trace file is PMON writing into right now, …
Read MoreOracle CREATE DIRECTORY Command Explained
Apr 12, 2026 / · 6 min read · Oracle DBA SQL DataPump Directory Database Administration PL/SQL Oracle Scripts all_directories dba_directories ·Oracle CREATE DIRECTORY Command Explained The Oracle CREATE DIRECTORY command creates a directory object — a logical alias inside the Oracle database that points to a real folder on the server's file system. This is one of the most used setup steps for Oracle Data Pump exports and imports, UTL_FILE file operations, …
Read MoreOracle Data Pump: Create the DATA_PUMP_DIR Directory
Apr 11, 2026 / · 5 min read · Oracle Data Pump Database Administration Oracle Backup expdp impdp Directory Object SQL all_directories dba_directories v$parameter ·Oracle Data Pump: Create the DATA_PUMP_DIR Directory Before you can run any Oracle Data Pump export (expdp) or import (impdp) job, Oracle needs to know where to write and read dump files and log files on the server. You do this by creating a directory object inside the database that points to a real folder on the …
Read MoreOracle Data Pump Export Schema with expdp Command Guide
Apr 10, 2026 / · 4 min read · Oracle DataPump expdp Database Backup Schema Export Oracle DBA Database Migration Logical Backup dba_directories ·Oracle Data Pump Export Schema with expdp Command Guide Oracle Data Pump's expdp utility lets you take a fast, flexible logical backup of any schema in your Oracle database. This post breaks down a simple schema-level export command, explains each parameter, and shows you how to run it safely. What This Command Does …
Read MoreOracle expdp Schema Export Using Data Pump
Apr 9, 2026 / · 5 min read · Oracle DataPump expdp Database Backup Schema Export DBA Oracle Scripts Logical Backup ·Oracle expdp Schema Export Using Data Pump Oracle Data Pump's expdp utility lets you export a full database schema — including tables, indexes, constraints, and data — into a portable dump file. This guide breaks down the single-line command that does exactly that for the andy schema. Purpose of This Command The goal …
Read More