Running Oracle Database on Linux

Running Oracle Database on Linux

A Practical Operations Guide for DBAs and Platform Teams

1. Executive Summary

Most Oracle Database incidents that reach a support queue are not database bugs. They are host-level: a shared memory segment that cannot be allocated, a transparent huge page setting that was never disabled, an operating-system limit applied to the wrong process, a udev rule that renamed an ASM disk after a reboot, or an I/O scheduler left at a default that doubles log write latency.

Linux gives the DBA an unusual degree of control and an equal number of ways to get it wrong. This paper consolidates the configuration decisions that matter when Oracle Database runs on Linux, into a single reference that a platform team can apply as a build standard and a DBA can use as a troubleshooting map.

The guide is deliberately version-agnostic in structure and specific where it matters. Values shown are the documented baseline for Oracle Database 19c and later (including 21c and 23ai) on Oracle Linux 8/9 and RHEL 8/9; always confirm certification and exact parameter values against the current Oracle installation guide for your release before applying them.

What this document delivers

  • A host build standard: preinstall RPM usage, package baseline, user/group model, and a signed-off checklist.
  • Kernel and memory configuration explained by mechanism, not just by value so you know why shmall, shmmax, HugePages and THP interact.
  • A storage and I/O design section covering XFS, ASM, ASMFD, device-mapper multipath, udev persistence and async I/O.
  • Service management with systemd: correct unit files, resource limits, startup ordering and clean shutdown.
  • A troubleshooting playbook mapping twelve common ORA-/CRS- errors to root cause and fix.
  • A lifecycle section on Release Update cadence, OPatch, datapatch, AutoUpgrade and 19c end-of-premier-support planning.
  • A companion audit script (oracle_linux_readiness.sh) that checks a host against this standard and produces a PASS/WARN/FAIL report

2. Scope, Audience and Assumptions

Item

Assumption

Database releases

Oracle Database 19c, 21c, 23ai β€” single instance and RAC

Operating systems

Oracle Linux 8/9 (UEK or RHCK), RHEL 8/9

Deployment

On-premises, IaaS and on-premises cloud (OCI Compute, VMware, KVM)

Out of scope

Exadata-specific cell configuration, Autonomous Database, Windows

Reader

DBA, Linux administrator, or platform engineer owning an Oracle estate

Commands are shown for Oracle Linux/RHEL. Substitute dnf for yum on older builds. All examples assume the grid infrastructure owner is grid and the database owner is oracle; adjust to your naming standard.

Β 

3. Certification and Platform Choices

Oracle Database is certified on a narrow set of Linux distributions and kernel versions, and the kernel matters as much as the distribution. Two kernel choices exist on Oracle Linux: the Unbreakable Enterprise Kernel (UEK) and the Red Hat Compatible Kernel (RHCK). UEK is the default, is where Oracle performs most of its testing, and generally carries the newer I/O and memory features including optimizations that Oracle’s own engineering relies on. RHCK exists for compatibility with third-party agents that inspect kernel version strings.

Decision guidance

  • Default to Oracle Linux with UEK on x86-64 for new builds. It is the reference platform and the one with the lowest friction when raising SRs.
  • Use RHCK only when a mandated third-party product (backup agent, monitoring agent, ERP middleware) refuses to install or is uncertified on UEK.
  • Stay on a certified kernel major version for the database release. Kernel updates are usually safe, but pin the kernel package on production hosts and test kernel changes in the same change window as database Release Updates.
  • ARM (aarch64) is certified for recent releases on Oracle Linux; confirm per release before standardising on it.

Table 1:Β  Platform selection summary. Confirm current certification on My Oracle Support (Certification tab) and in the Oracle Database Installation Guide for your release.

Consideration

Recommended position

Distribution

Oracle Linux 8 or 9, x86-64 (primary); RHEL 8/9 where mandated

Kernel

UEK (default). RHCK only for compatibility exceptions

Filesystem

XFS for ORACLE_HOME, ORACLE_BASE and archive destinations

Volume manager / ASM

ASM for datafiles and redo (ASMFD or ASMLib alternative: udev rules)

SELinux

Targeted/permissive with documented exceptions; never disabled silently

Time sync

chrony against two internal sources; mandatory for RAC

Container runtime

Podman for containerised single instance; Docker unsupported by Oracle

Β 

4. Reference Architecture

Figure 1:Β  Reference architecture. The database layer depends on a narrow, well-defined contract with the host: shared memory, HugePages, direct and async I/O, device persistence and systemd resource limits. Most production incidents trace back to one of these five seams.

A production Oracle host on Linux is best understood as five stacked layers, each with its own configuration surface. Most misconfigurations live at the boundaries between layers.

Layer

Components

Configuration surface

Hardware / firmware

CPU, memory, HBAs, SAN/NAS, BIOS power profile

NUMA, SMT, I/O MMU, firmware levels, power governor

Kernel

Scheduler, memory manager, block layer, network stack

sysctl, HugePages/THP, I/O scheduler, ulimits

Storage

Multipath, LVM or ASM, filesystems, devices

multipath.conf, udev rules, XFS mount options

Oracle software

Grid Infrastructure, ASM, database home, listener

ORACLE_HOME, inventory, opatch, srvctl

Service management

systemd units, resource control, monitoring agents

unit files, slices, limits, OSwatcher/TFA

Β 

Design rule: every layer must be reproducible from code. A host that cannot be rebuilt identically from a documented playbook is a host you cannot safely patch. Treat the sysctl file, the udev rules, the multipath configuration and the systemd unit as version-controlled artefacts, not as tribal knowledge.

Β 

5. Host Build Standard

5.1 Preinstallation RPM

Oracle ships a preinstallation RPM that creates the oracle and grid users and groups, installs the required packages, and writes the baseline kernel parameters and limits. It is the fastest way to a compliant host and it removes an entire class of β€˜missing package’ failures at installation time.

Figure 2: Host build pipeline. A repeatable, idempotent sequence from base OS to a signed-off build. Each gate is verifiable by the companion audit script in Appendix A, which is why the standard can be enforced rather than merely documented.

Β 

# Oracle Linux 8 / 9 β€” package name follows the database release
dnf install -y oracle-database-preinstall-23aiΒ Β Β  # or -19c / -21c
# RHEL: the RPM is on the Oracle Linux yum server / oracle-download pages
dnf install -y https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/oracle-database-preinstall-23ai-1.0-3.el9.x86_64.rpm

# What it did
id oracle; id grid
rpm -qc oracle-database-preinstall-23ai | sort
sysctl –system | grep -E β€˜shm|sem|aio|file-max’

Do not stop at the RPM. It sets conservative values suitable for a generic host; production sizing, Huge Pages, shmmax, ulimits for large SGAs, systemd limits still requires the work in sections 6 and 9.

5.2 Package baseline

Beyond the preinstall list, the following are commonly required in real estates and are worth including in the golden image: tuned, chrony, ksh, nfs-utils, smartmontools, sysstat, pcp (or OSwatcher), lvm2, device-mapper-multipath, net-tools, bind-utils, tar, unzip, rsync, policycoreutils-python-utils, and a supported JDK if you run Oracle Enterprise Manager agents or AutoUpgrade.

5.3 Users, groups and filesystem layout

Object

Purpose

Typical setting

oracle

Database software owner

Primary group oinstall; supplementary dba, oper, backupdba, dgdba, kmdba, asmdba, racdba

grid

Grid Infrastructure / ASM owner

Primary group oinstall; supplementary asmadmin, asmdba, asmoper, dba

/u01/app/oracle

ORACLE_BASE

XFS, noatime, 100+ GB

/u01/app/grid

Grid home base

Separate filesystem from database home where possible

/u02, /u03

Data / redo if not on ASM

XFS with large extent and stripe geometry aligned

/u01/app/oracle/fast_recovery_area

FRA

Sized for archive retention; separate LUN strongly preferred

Group membership is a security boundary as well as a functional one: members of dba can start the instance with SYSDBA. Keep dba membership minimal and audited; use oper for start/stop delegation and backupdba for RMAN-only access.

Β 

6. Kernel and Memory Configuration

6.1 Shared memory: shmmax, shmall and shmmni

Oracle allocates its System Global Area as a System V shared memory segment (unless you use the large-pages-backed or MEMORY_TARGET paths, which still rest on the same limits). Three parameters govern this:

Parameter

Meaning

Baseline value (19c+)

kernel.shmmax

Largest single shared memory segment, in bytes

Half of physical RAM, or 4 GB-1 if smaller

kernel.shmall

Total shared memory pages system-wide (pages, not bytes)

physical RAM / PAGE_SIZE (e.g. 16 GB host = 4194304 pages of 4 KB)

kernel.shmmni

Maximum number of shared memory segments

4096

Β 

# Calculate rather than guess
PAGE=$(getconf PAGE_SIZE)
MEM_KB=$(grep MemTotal /proc/meminfo | awk β€˜{print $2}’)
echo β€œkernel.shmmax = $(( MEM_KB * 1024 / 2 ))”
echo β€œkernel.shmall = $(( MEM_KB * 1024 / PAGE ))”

# Persist in a drop-in, not in /etc/sysctl.conf
cat >/etc/sysctl.d/97-oracle-database.conf <<β€˜EOF’
kernel.shmmax = 8589934592
kernel.shmall = 4194304
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.swappiness = 10
vm.dirty_ratio = 20
vm.dirty_background_ratio = 3
EOF
sysctl –system

Figure 3:Β  Memory allocation model. SGA is backed by HugePages sized from sga_target plus overhead; PGA is private anonymous memory governed by pga_aggregate_target; the remainder must stay free for the OS page cache and background processes.

fs.aio-max-nr is frequently underestimated. Each Oracle process can hold asynchronous I/O contexts, and on hosts with many sessions or many ASM disks the default of 65536 is exhausted, producing β€˜io_setup failed’ in the alert log and crippling asynchronous I/O. 1048576 is the documented baseline; verify with grep aio /proc/sys/fs/aio-nr against aio-max-nr during peak load.

6.2 HugePages and Transparent HugePages

This is the single highest-value tuning decision on a Linux Oracle host, and the most frequently missed.

Standard 4 KB pages mean a 64 GB SGA is described by roughly 16 million page table entries. Every process touching that memory pays the cost of walking and maintaining that structure, and the kernel’s page-table management overhead rises with it. HugePages (2 MB on x86-64) collapse that to about 32,000 entries. The result is lower CPU spent in kernel memory management, more stable latency, and critically memory that cannot be swapped or reclaimed.

Transparent HugePages (THP) is the automatic, kernel-managed variant. It sounds like the same benefit, and for many workloads it is. For Oracle it is not: khugepaged can stall processes while compacting memory, and Oracle’s own allocator interacts badly with the transparent path. Oracle’s documented recommendation is to disable THP for database servers and use explicitly sized static HugePages instead.

Β 

# 1. Disable transparent huge pages (persist across reboot)
cat >/etc/systemd/system/disable-thp.service <<β€˜EOF’
[Unit]
Description=Disable Transparent Huge Pages
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=oracle-rdbms.service

[Service]
Type=oneshot
ExecStart=/bin/sh -c β€˜echo never > /sys/kernel/mm/transparent_hugepage/enabled’
ExecStart=/bin/sh -c β€˜echo never > /sys/kernel/mm/transparent_hugepage/defrag’

[Install]
WantedBy=basic.target
EOF
systemctl daemon-reload && systemctl enable –now disable-thp.service
cat /sys/kernel/mm/transparent_hugepage/enabledΒ Β Β Β Β  # expect [never]

# 2. Size static HugePages from the actual SGA
#Β Β Β  Rule of thumb: SGA_MB / 2Β  +Β  ~10% headroom for PGA/other large allocations
grep Hugepagesize /proc/meminfoΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  # 2048 kB
SGA_MB=65536; echo β€œvm.nr_hugepages = $(( SGA_MB / 2 + 64 ))”
echo β€˜vm.nr_hugepages = 32832’ >> /etc/sysctl.d/97-oracle-database.conf
sysctl -w vm.nr_hugepages=32832
grep -E β€˜HugePages_Total|HugePages_Free|HugePages_Rsvd’ /proc/meminfo

# 1. Disable transparent huge pages (persist across reboot)
cat >/etc/systemd/system/disable-thp.service <<β€˜EOF’
[Unit]
Description=Disable Transparent Huge Pages
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=oracle-rdbms.service

[Service]
Type=oneshot
ExecStart=/bin/sh -c β€˜echo never > /sys/kernel/mm/transparent_hugepage/enabled’
ExecStart=/bin/sh -c β€˜echo never > /sys/kernel/mm/transparent_hugepage/defrag’

[Install]
WantedBy=basic.target
EOF
systemctl daemon-reload && systemctl enable –now disable-thp.service
cat /sys/kernel/mm/transparent_hugepage/enabledΒ Β Β Β Β  # expect [never]

# 2. Size static HugePages from the actual SGA
#Β Β Β  Rule of thumb: SGA_MB / 2Β  +Β  ~10% headroom for PGA/other large allocations
grep Hugepagesize /proc/meminfoΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  # 2048 kB
SGA_MB=65536; echo β€œvm.nr_hugepages = $(( SGA_MB / 2 + 64 ))”
echo β€˜vm.nr_hugepages = 32832’ >> /etc/sysctl.d/97-oracle-database.conf
sysctl -w vm.nr_hugepages=32832
grep -E β€˜HugePages_Total|HugePages_Free|HugePages_Rsvd’ /proc/meminfo

Β 

Note the difference between allocated and reserved pages. HugePages_Rsvd counts pages promised to a starting instance but not yet touched. During startup the instance reserves its whole SGA; if free + reserved pages are insufficient, startup fails with ORA-27102 or falls back to 4 KB pages (visible in the alert log as β€˜Discontiguous group of pages’ or a warning that HugePages are not being used).

If you run multiple instances on one host, sum their SGAs and add headroom. If you use Oracle Restart or RAC, set HugePages before starting Grid Infrastructure, and remember that ASM itself consumes a small SGA.

6.3 NUMA and CPU

On multi-socket servers, disable automatic NUMA balancing for database hosts (kernel.numa_balancing=0) and size instances to NUMA nodes where possible. For very large SGAs on NUMA hardware, Oracle’s default allocation policy can produce remote-memory access; consider interleave or explicit per-node instance placement rather than a single huge instance spanning sockets. Also align the CPU governor to performance (tuned profile throughput-performance or oracle) a powersave governor on a database host produces exactly the kind of latency jitter that shows up as log file sync waits.

6.4 Limits: ulimit and systemd

Traditional advice says edit /etc/security/limits.conf. On systemd-based distributions that is only half the story: the login shell gets the limits, but a service started by systemd inherits the unit’s limits, not the user’s. Both must be set.

Limit

Value

Why

nofile

1024 soft / 65536 hard (higher for large estates)

Sessions, files, ASM disks, trace files

nproc

16384

Server and background process count

stack

1024 soft / 32767 hard

Deep recursion in some Oracle utilities

memlock

unlimited

Required for HugePages and locked SGA

core

0 (or sized per policy)

Prevents multi-GB core dumps filling the filesystem

Β 

# /etc/security/limits.d/99-oracle-database.conf
oracleΒ  softΒ  nofileΒ Β Β  1024
oracleΒ  hardΒ  nofileΒ Β Β  65536
oracleΒ  softΒ  nprocΒ Β Β Β  16384
oracleΒ  hardΒ  nprocΒ Β Β Β  16384
oracleΒ  softΒ  stackΒ Β Β Β  1024
oracleΒ  hardΒ  stackΒ Β Β Β  32767
oracleΒ  softΒ  memlockΒ Β  unlimited
oracleΒ  hardΒ  memlockΒ Β  unlimited
# repeat for grid

# systemd drop-in for the database unit
mkdir -p /etc/systemd/system/oracle-rdbms.service.d
cat >/etc/systemd/system/oracle-rdbms.service.d/limits.conf <<β€˜EOF’
[Service]
LimitNOFILE=65536
LimitNPROC=16384
LimitSTACK=32767
LimitMEMLOCK=infinity
EOF

LimitMEMLOCK=infinity is not optional if you use HugePages. Without it the instance cannot lock the pages, and you will see ORA-27102 or a silent fallback to small pages after a systemd-managed restart even though the manual sqlplus startup worked, because your interactive shell had a different limit.

Β 

7. Storage, Filesystems and ASM

7.1 Filesystem choice and mount options

XFS is the standard for Oracle on Linux: it scales well on large LUNs, handles concurrent direct I/O cleanly, and is the filesystem Oracle tests against. ext4 works but offers no advantage. Mount ORACLE_HOME and data volumes with noatime (avoid a metadata write on every read), and never with nosuid or noexec on the Oracle home a noexec mount breaks the oracle binary and produces the infamous ORA-12547: TNS:lost contact at connect time.

# /etc/fstab example
/dev/mapper/vg_u01-lv_u01Β  /u01Β  xfsΒ  defaults,noatime,nodiratimeΒ  0 0
/dev/mapper/vg_u02-lv_u02Β  /u02Β  xfsΒ  defaults,noatime,nodiratimeΒ  0 0
# Verify
findmnt -no OPTIONS /u01
df -hT /u01 /u02

Size ORACLE_HOME generously: a modern database home with a full set of options plus patch backups and the inventory can exceed 40 GB, and OPatch needs free space roughly equal to the home size during a Release Update.

7.2 ASM device naming: udev versus ASMFD

ASM needs stable, permission-correct block devices at every boot. Three approaches exist; pick one and document it.

Figure 4: Storage and I/O path. Multipath presents a single pseudo-device over redundant fabrics; udev or ASMFD pins the name and ownership; ASM stripes across disks while XFS and the FRA serve the filesystem side of the same stack.

Β 

Approach

How it works

Verdict

udev rules + scsi_id/wwid

Rules map a disk’s WWID to a persistent /dev/asm-* symlink

Portable, no extra software; verbose rule set; must survive HBA changes

ASMFD (Oracle ASM Filter Driver)

Kernel module claims devices and labels them; filters non-ASM writes

Oracle’s strategic option; requires correct kernel module build and afd_label

ASMLib

Legacy Oracle library with oracleasm labels

Deprecated; do not choose for new builds

Β 

# udev approach β€” one rule per LUN, generated from WWIDs
for d in /dev/sd{b..f}; do
Β  wwid=$(/usr/lib/udev/scsi_id -g -u -d $d)
Β  echo β€œKERNEL==”sd*”, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$name”, RESULT==”$wwid”, SYMLINK+=”asm-$(basename $d)”, OWNER=”grid”, GROUP=”asmadmin”, MODE=”0660″” >> /etc/udev/rules.d/99-oracle-asmdevices.rules
done
udevadm control –reload-rules && udevadm trigger –type=devices –action=change
ls -l /dev/asm-*
# Expect: brw-rwβ€”- 1 grid asmadmin

# ASMFD alternative
asmcmd afd_label DATA1 /dev/sdb –init
asmcmd afd_lslbl /dev/sdb

The classic post-reboot failure CRS-4535, ORA-15018 or β€˜ASM disk is missing’ almost always traces to a rule that no longer matches because the device path changed (sda became sdc after a controller reorder) or because the rule file was never reloaded. Always test with a full reboot, not just a service restart, before handing a host to production.

7.3 Multipath and I/O scheduling

On SAN-attached storage, device-mapper multipath is mandatory; without it the host sees each path as a separate disk and ASM may be presented with the same LUN twice. Configure a vendor-appropriate path_checker (tur for most arrays), a queue depth that matches the HBA and array, and a path_grouping_policy of multibus or failover consistent with the array’s ALUA behaviour.

# /etc/multipath.conf (excerpt)
defaults {
Β Β Β  user_friendly_names yes
Β Β Β  path_grouping_policy multibus
Β Β Β  path_checker tur
Β Β Β  failback immediate
Β Β Β  no_path_retry 15
Β Β Β  rr_min_io_rq 1
}
blacklist {
Β Β Β  devnode β€œ^sd[a-z]$”      # exclude local boot disks
}
# After editing
multipath -r; multipath -ll

For the I/O scheduler: NVMe and modern all-flash arrays perform best with none (no scheduler). SATA/SAS SSD and general SAN LUNs generally do well with mq-deadline. The legacy deadline and cfq schedulers are gone from current kernels. Set the scheduler per device with a udev rule so it survives reboots, and set rotational=0 for flash so the block layer stops optimising for seek time.

cat >/etc/udev/rules.d/60-oracle-iosched.rules <<β€˜EOF’
ACTION==”add|change”, KERNEL==”sd*”, ATTR{queue/rotational}==”0β€³, ATTR{queue/scheduler}=”none”
ACTION==”add|change”, KERNEL==”sd*”, ATTR{queue/rotational}==”1β€³, ATTR{queue/scheduler}=”mq-deadline”
ACTION==”add|change”, KERNEL==”nvme*”, ATTR{queue/scheduler}=”none”
EOF
udevadm control –reload-rules && udevadm trigger
for d in /dev/sd* /dev/nvme*n1; do echo β€œ$d $(cat /sys/block/${d#/dev/}/queue/scheduler 2>/dev/null)”; done

Β 

7.4 Redo, archive and FRA placement

Redo log writes are latency-sensitive and synchronous. Put redo on the lowest-latency, lowest-contention device available separate from datafiles if the array allows it and never on NFS unless it is a certified, tested configuration. Archive destinations should be on a different failure domain from the FRA, and FRA on a different LUN from the datafiles, otherwise a single LUN failure takes out both the database and its recovery copy.

8. Installation Approaches

Method

Best for

Notes

OUI (graphical or silent response file)

Standard enterprise installs

Full control of options; silent install via response file is the automation path

RPM (oracle-database-*-free / prebuilt)

Lab, dev, quick 23ai Free deployments

Preconfigured single instance; less flexible; excellent for training environments

DBCA silent + templates

Repeatable builds

Combine with response files for identical instances across environments

Container images (Podman)

CI, ephemeral dev, microservice-side databases

Oracle-supported images; not a substitute for a tuned production host

Grid Infrastructure + RAC

HA and scale-out

Requires shared storage, private interconnect, chrony, and careful udev/ASM design

Β 

For silent installs, the response file is the deliverable. Store it in Git alongside the sysctl drop-in and udev rules, so a host can be rebuilt identically. A minimal silent install looks like this:

# Database software only, silent
./runInstaller -silent -waitforcompletion -ignorePrereqFailure
Β  -responseFile /stage/db_install.rsp
Β  -oracleHome /u01/app/oracle/product/19.0.0/dbhome_1
Β  -oracleBase /u01/app/oracle
Β  -sysPassword β€œ$(cat /run/secrets/sys)”
Β  -inventoryLocation /u01/app/oraInventory

# Post-install as root
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/19.0.0/dbhome_1/root.sh

# Instance creation, silent
dbca -silent -createDatabase -templateName General_Purpose.dbc
Β  -gdbName ORCL -sid ORCL -createAsContainerDatabase true
Β  -numberOfPDBs 1 -pdbName PDB1
Β  -sysPassword β€œ$(cat /run/secrets/sys)” -systemPassword β€œ$(cat /run/secrets/sys)”
Β  -datafileDestination +DATA -recoveryAreaDestination +FRA
Β  -characterSet AL32UTF8 -totalMemory 16384 -emConfiguration NONE

Β 

9. Service Management with systemd

dbstart and dbshut still exist, but on systemd hosts the correct pattern is a native unit. A proper unit gives you ordering against network and storage, restart policy, resource limits, and clean journald logging.

# /etc/systemd/system/oracle-rdbms.service
[Unit]
Description=Oracle Database instance %i
After=network-online.target disable-thp.service
Wants=network-online.target
RequiresMountsFor=/u01

[Service]
Type=forking
User=oracle
Group=oinstall
Environment=ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
Environment=ORACLE_SID=%i
Environment=LD_LIBRARY_PATH=/u01/app/oracle/product/19.0.0/dbhome_1/lib
ExecStart=/u01/app/oracle/product/19.0.0/dbhome_1/bin/sqlplus -s / as sysdba @/u01/app/oracle/admin/scripts/start_%i.sql
ExecStop=/u01/app/oracle/product/19.0.0/dbhome_1/bin/sqlplus -s / as sysdba @/u01/app/oracle/admin/scripts/stop_%i.sql
Restart=on-failure
RestartSec=30
TimeoutStartSec=900
TimeoutStopSec=600

[Install]
WantedBy=multi-user.target

For RAC and Oracle Restart, do not hand-roll units: use srvctl and the ohasd stack, which already integrate with systemd through the oracle-ohasd units. Attempting both leads to double-start races and instances that come up before ASM.

systemctl daemon-reload
systemctl enable oracle-rdbms.service
systemctl start oracle-rdbms.service
systemctl status oracle-rdbms.service
journalctl -u oracle-rdbms.service -n 50

# RAC / Restart equivalents
srvctl status database -d PROD
srvctl start database -d PROD -o mountΒ Β Β Β  # controlled startup order
crsctl stat res -t

Startup ordering matters. The listener should start after the instance in single-instance setups (or independently in RAC), and nothing should start before the filesystem and multipath are ready. RequiresMountsFor plus After=multipathd.service is a cheap way to prevent the classic β€˜database started before /u02 was mounted’ corruption scenario.

Β 

10. Performance Analysis on Linux

The DBA’s advantage on Linux is that every Oracle wait event has a kernel-level correlate. Learn four tools and you can explain almost any slowdown.

Tool

Question it answers

Key invocation

top / htop

Is the host CPU-, memory- or I/O-bound right now?

top -H -p $(pgrep -d, -u oracle)

vmstat / sar

Is the problem sustained or a spike? Is swap in use?

vmstat 1 30; sar -u -r -b -d 1 30

iostat

Which device, what latency, queue depth, %util?

iostat -xmdz 1 30

pidstat / perf

Which process and thread, user or kernel time?

pidstat -u -d -p ALL 1 20

ss / netstat

Connection storms, listen backlog, retransmits

ss -s; ss -tan state established | wc -l

dmesg / journalctl

OOM killer, I/O errors, link flaps, THP warnings

journalctl -k –since β€˜1 hour ago’

Β 

Figure 5: systemd unit ordering and dependency chain. LimitNOFILE and LimitMEMLOCK must be set on the database unit itself; ordering against network-online and the ASM unit prevents the classic β€˜ORA-01078 / CRS-4535 on boot’ failure.

Β 

Symptom-to-cause mapping

Symptom in Oracle

Linux evidence to check

Likely root cause

β€˜log file sync’ dominant

iostat await on redo LUN; high %util; queue depth saturated

Redo on contended or high-latency storage; write cache policy

β€˜db file sequential read’ slow

await per device, path failures in multipath -ll

One failed path, misaligned I/O, or array cache disabled

High sys time, low user time

perf top showing kernel page-table or memcpy functions

THP enabled, HugePages not used, or excessive context switching

Sudden memory pressure

vmstat si/so non-zero; OOM killer in dmesg

SGA/PGA oversubscription; swap too small or too large a page cache

Intermittent 1-2 second stalls

dmesg SCSI resets, HBA errors, khugepaged activity

Storage path instability or THP compaction

CPU at 100% with low load

pidstat showing ksoftirqd / kworker

Interrupt or softirq storm from NIC or HBA; IRQ affinity

Β 

Correlate with AWR rather than guessing: pull the top timed events for the interval, then check whether the wait is Oracle-side (latch, enqueue, buffer busy) or OS-side (I/O, CPU, memory). If the top event is an I/O event, the fix is almost never a database parameter, it is the storage path.

11. Troubleshooting Playbook

The twelve failures below account for the large majority of Linux-specific Oracle incidents. Each has a deterministic root cause and a short fix.

Error

Root cause

Resolution

ORA-27102: out of memory

SGA larger than shmmax/shmall, or insufficient free HugePages

Recalculate shmmax/shmall; verify HugePages_Free + Rsvd; reduce SGA or add pages

ORA-00845: MEMORY_TARGET not supported

/dev/shm (tmpfs) smaller than MEMORY_TARGET

Mount /dev/shm at 50-75% of RAM in fstab; or use SGA_TARGET with HugePages

ORA-27300/27301/27302

OS call failed limits, memlock, or process count

Raise LimitNPROC/LimitMEMLOCK in the systemd drop-in; check /proc/sys/kernel/pid_max

ORA-12547: TNS:lost contact

oracle binary not executable/setuid; noexec mount; wrong owner or missing group

chmod 6751 $ORACLE_HOME/bin/oracle; fix mount options; verify group membership

ORA-04031: unable to allocate shared memory

Shared pool / large pool exhaustion or fragmented SGA

Check sga_target vs actual; enable HugePages; review shared_pool_reserved_size

TNS-12555 / permission denied on /var/tmp/.oracle

Stale or wrongly owned IPC socket directory

Stop listener; rm -rf /var/tmp/.oracle/*; restart as oracle; verify 1777

CRS-4535 / ORA-15018 disk missing

udev rule mismatch, multipath change, or label loss

Compare ls -l /dev/asm-* with asm_diskstring; reload udev; re-label with afd_label

ORA-15063 / ORA-15032

ASM cannot discover the disk string

Verify asm_diskstring, permissions 0660 grid:asmadmin, and that the device is not claimed by LVM

Slow I/O with β€˜io_setup failed’

fs.aio-max-nr exhausted

Raise fs.aio-max-nr to 1048576+; confirm aio-nr < aio-max-nr under load

Instance hangs then node evicted (RAC)

Interconnect latency, CSS misscount, or VM snapshot/CPU steal

Check private network, disable VM snapshots, tune css_misscount with Oracle support

Startup fails after reboot only

Storage or multipath not ready when the unit starts

Add RequiresMountsFor and After=multipathd.service; test with a real reboot

Heavy swapping, poor throughput

vm.swappiness default 60 with overcommitted memory

Set vm.swappiness=10, size SGA+PGA within RAM, disable THP

Β 

Two habits make this list tractable. First, always read the alert log and the trace file together with the OS log for the same timestamp ORA- errors are symptoms, the kernel message is usually the cause. Second, reproduce with a full reboot. A configuration that survives systemctl restart but not reboot is a configuration that will fail in production at 3 a.m.

12. Patching and Lifecycle

Oracle moved to a quarterly Release Update model, with Release Update Revisions (RURs) for security-focused estates and Monthly Recommended Patches for the most urgent fixes. The mechanics on Linux are stable and well understood:

  1. Stage the patch and verify the checksum; read the README for prerequisites and known issues every RU README lists the ones that will bite you.
  2. Run the OPatch prerequisite check: opatch prereq CheckConflictAgainstOHWithDetail -ph ./
  3. Apply with opatch apply, using a rollback-enabled run and a known-good ORACLE_HOME backup (or a golden image snapshot).
  4. Run datapatch -verbose to apply SQL changes to every container and pluggable database this is the step most often forgotten, leaving the binary and dictionary versions mismatched.
  5. Recompile invalid objects, refresh statistics on dictionary tables where recommended, and re-run the application smoke test.

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH

opatch lspatches
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
opatch apply -silent
$ORACLE_HOME/OPatch/datapatch -verbose
opatch lsinventory -detail | head -40
$ORACLE_HOME/OPatch/opatch util ListDeletedFilesΒ Β  # space check

# Rolling upgrade / major version move
java -jar /stage/autoupgrade.jar -config PROD.cfg -mode analyze
java -jar /stage/autoupgrade.jar -config PROD.cfg -mode deploy

End-of-support planning

Oracle Database 19c remains the long-term release for most estates, but its Premier Support window closes in April 2027; Extended Support continues afterwards. Any estate still on 19c needs a written plan covering: target release (23ai or the current long-term release), application certification, ASM/Grid upgrade path, and a rehearsed AutoUpgrade run against a production clone. Start twelve to eighteen months before the deadline; the constraint is rarely the database upgrade itself and almost always the application and third-party tooling certification.

Confirm all dates and release numbers against the Oracle Lifetime Support Policy and My Oracle Support before committing to a plan they change, and this document is a guide, not a contract.

Figure 6: Release Update cadence and the DBA’s quarterly cycle. The same four steps repeat for every RU: read the README, apply with OPatch, run datapatch, validate. AutoUpgrade shortens the major-version move but does not change the cadence.

Β 

13. Security and Hardening

  • SELinux: keep it in targeted mode. Oracle ships policy for database files; if you must relax it, use permissive mode plus a documented exception list, never β€˜disabled’. Check denials with ausearch -m avc -ts recent before blaming the database for a permission error.
  • firewalld: open only 1521 (and 5500 for EM Express) to application subnets; for RAC add the interconnect and SCAN ports on the private zone only. Do not disable the firewall as a shortcut.
  • Filesystem permissions: 0750 on ORACLE_HOME directories, 0600 on wallet and password files, 0660 on ASM devices with grid:asmadmin. Audit dba group membership quarterly.
  • Transparent Data Encryption for data at rest; TLS for the listener (TCPS) and for EM; wallet-based sqlnet authentication instead of clear-text passwords in scripts.
  • Audit: unified auditing on, with a retention policy that matches your compliance regime. Ship audit trail off-box; a host compromise that takes the audit trail with it is worthless evidence.
  • Least privilege: no direct SYSDBA for application accounts, no shared passwords, no oracle OS login for interactive users use sudo with command restrictions to a controlled sqlplus wrapper.

Β 

14. Build Validation and Go-Live Gate

No host should enter production without passing a repeatable validation. The checklist below is the minimum; the companion script automates the machine-checkable portion and prints PASS/WARN/FAIL with remediation hints.

#

Check

Pass criterion

1

OS and kernel certified for the release

Matches MOS certification matrix

2

Preinstall RPM applied

rpm -q returns installed; users and groups exist

3

Kernel parameters

shmmax/shmall/sem/aio/file-max match standard

4

HugePages sized and in use

HugePages_Total >= SGA/2MB; alert log shows no fallback

5

THP disabled persistently

/sys/…/enabled shows [never] after reboot

6

ulimits and systemd limits

nofile, nproc, memlock correct for the service process

7

Storage visible and persistent

All LUNs present via multipath with 2+ paths; udev symlinks stable after reboot

8

ASM devices permissions

grid:asmadmin 0660 on every disk

9

Filesystem mount options

noatime set; noexec absent from ORACLE_HOME mount

10

Time synchronisation

chronyc tracking offset < 50 ms; sources reachable

11

Service management

systemd unit enabled; clean start/stop; survives reboot

12

Backup and restore proven

RMAN restore tested to a clone host

13

Monitoring wired

OSWatcher/TFA collecting; alerts route to on-call

14

Patching baseline recorded

opatch lspatches output filed with the build record

Β 

Β 

15. Contribution Plan for the Oracle ACE Programme

A technical paper is stronger as a programme than as a one-off document. The structure below turns this material into a contribution track that is measurable, reusable and citable.

Asset

Format

Purpose

This whitepaper

PDF/DOCX, 15-20 pages

Reference artefact; linked from every other asset

Blog series (6 parts)

Technical posts, 1,200-1,800 words each

Searchable reach: build standard, HugePages, ASM/udev, systemd, troubleshooting, patching

oracle_linux_readiness.sh

GitHub repo, MIT licence

Reusable tool; the reason readers bookmark the work

Conference / user group talk

45 min + demo

Visibility: Tech Days, local OUG, regional Oracle events

Webinar / live demo

60 min

Community engagement; Q&A generates follow-up content

Q&A / forum answers

Stack Overflow, MOS Community, OUG lists

Sustained engagement between publication cycles

Β 

Suggested six-part series

Part

Title

Core message

1

Building a compliant Oracle Linux host

Preinstall RPM is the floor, not the ceiling

2

Shared memory and HugePages, explained by mechanism

Why 4 KB pages cost you CPU, and how to size static pages

3

ASM device persistence: udev vs ASMFD

Never let a reboot rename your datafiles

4

Running Oracle under systemd properly

Limits, ordering and clean shutdown

5

The Linux troubleshooting playbook

Twelve errors, twelve root causes

6

Patching and the 19c exit plan

OPatch, datapatch, AutoUpgrade, and a realistic timeline

Measuring impact

  • Reach: page views, unique readers, repo clones and stars, video views.
  • Engagement: comments, questions answered, issues raised against the script, pull requests.
  • Adoption signals: teams reporting they used the checklist or script in a real build the strongest evidence for an ACE nomination.
  • Reuse: citations from other blogs, OUG newsletters, internal standards documents.

Β 

16. Reference Sources

Validate every parameter and date against the current documentation for your release before implementation:

  • Oracle Database Installation Guide for Linux operating system requirements, kernel parameters, preinstallation RPM.
  • Oracle Database Administrator’s Reference for Linux and UNIX environment variables, limits, HugePages.
  • Oracle Grid Infrastructure Installation and Upgrade Guide ASM device persistence, ASMFD, multipath.
  • Oracle Database Release Notes and Patch READMEs per-release prerequisites and known issues.
  • Oracle Lifetime Support Policy: Coverage for Oracle Open Source and Oracle Database releases.
  • My Oracle Support certification matrices and the Oracle Linux documentation set (UEK vs RHCK).

Β 

Appendix A Companion Audit Script

oracle_linux_readiness.sh is a read-only audit. It inspects the host against the standard in this paper and prints a colour-coded PASS/WARN/FAIL report with a summary count and an exit code suitable for CI or a build gate. It makes no changes and requires no database connection.

chmod +x oracle_linux_readiness.sh
sudo ./oracle_linux_readiness.shΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  # full audit
sudo ./oracle_linux_readiness.sh –sga 65536Β Β Β Β Β Β Β Β  # size HugePages check for a 64 GB SGA
sudo ./oracle_linux_readiness.sh –quietΒ Β Β Β Β Β Β Β Β Β Β Β  # summary only
./oracle_linux_readiness.sh –help

Checks performed: OS and kernel identification, CPU and NUMA topology, memory and swap, /dev/shm sizing, HugePages versus requested SGA, THP state, all documented kernel parameters, ulimits and systemd limits, package presence, SELinux and firewalld state, tuned profile, time synchronisation, filesystem types and mount options, multipath path counts, I/O schedulers, ASM device ownership, oracle/grid users and groups, oratab and listener state, and available space in ORACLE_BASE.

Exit codes: 0 all checks pass, 1 warnings only, 2 one or more failures. Suitable for wrapping in a provisioning pipeline so a host cannot be promoted until it is compliant.

    About Muhammad Ilyas Awan

    With 10+ years of experience in Oracle Technologies and Enterprise ERP solutions, I specialize in Oracle Database Administration, Oracle E-Business Suite (EBS), Oracle APEX, Oracle Forms & Reports Customization, and PL/SQL Development. Currently serving as a Database Administrator at Yaqoob Group of Companies, I focus on database performance, security, high availability, and business-critical application support. Passionate about transforming business requirements into scalable Oracle solutions, I have delivered customized ERP applications, process automation, and system integrations across HRMS, Procurement, Inventory, and Manufacturing domains. I believe in continuous learning, knowledge sharing, and leveraging Oracle technologies to drive business excellence and digital transformation.

    Check Also

    Full-Scale Workload Testing for Changes and Migrations

    Oracle Database Replay: Full-Scale Workload Testing for Changes and Migrations : Introduction : Every DBA …

    Leave a Reply