Oracle-DBA-Study
One-sentence rule: every answer — state the pick, the first data you would pull, and the trap you ruled out, in that order.
Role essence: enterprise-scale integration lead on Agile teams — design/develop/test/implement/support Oracle HA/DR (RAC, DataGuard, GoldenGate) on the CORE foundational cloud layer, migrating Exadata/on-prem Oracle toward AWS RDS with zero-data-loss RPO and customer-impact-first sev handling.
Today's drill
10-day index
Listen while you move
10 episodes (E1–E10). Tap Read aloud to use your phone's voice, or open the script. After each episode, pause and say the key line out loud. Voiced MP3s land with the media build; the player appears automatically when its file exists.
Scenario drill (timer on, narrate aloud)
Pick a scenario. Understand → Prepare → Identify → Support. Mitigate first when the customer is down. Name the metric.
Worked examples (read cold, predict, then check)
1 · RAC node eviction during batch
A 2-node RAC cluster evicts node 2 every night during batch, with gc cr block busy waits spiking first. Is this a clusterware bug, and what single check separates network cause from load cause?
Answer: not a bug until proven — check interconnect heartbeat history + OS network drops against eviction timestamps in CRS logs. Flaky switch = heartbeat loss with low load; real overload = waits track batch CPU/IO. Trap: patching clusterware before ruling out the interconnect.
2 · DataGuard two hours behind before close
Standby is 2h behind at month-end. V$DATAGUARD_STATS shows transport lag 0, apply lag 115 min, MRP running. Do you touch the network, and what is the fix order?
Answer: do not touch the network — transport is keeping up, apply is not. Fix order: standby disk/IO rate → missing index slowing SQL apply → parallel apply/MRP tuning → then backlog drain + lag alerting. Trap: failing over to a standby that has not caught up.
3 · GoldenGate replicat lag after batch
Replicat lag grows on the reporting target after a batch load; extract and pump show no lag. Add parallelism immediately?
Answer: not yet — check the target apply plan first (missing index on the target is the classic cause). Fix: index or parallelize replicat, drain backlog, add per-process lag monitors. Trap: tuning the source when only replicat lags.
Aloud scripts (E1–E10 texts + daily reps)
- E1 — RAC: cache fusion, interconnect, quorum
- E2 — DataGuard: FSFO, lag/apply, switchover vs failover
- E3 — GoldenGate: CDC, extract-pump-replicat, conflicts
- E4 — Perf tuning: AWR/ASH/ADDM drill order
- E5 — Backup/recovery + patching runbook
- E6 — Exadata: offload, cells, partitioning
- E7 — HA/DR + sev handling
- E8 — AWS RDS gap: DMS, CloudWatch
- E9 — Compliance + Agile
- E10 — Mock loop: scenario + case + STAR
Daily say-aloud reps
- "Understand. Prepare. Identify. Support. Data first, trap ruled out, fix that stays fixed."
- "RAC is not HA without fencing and quorum — interconnect first, clusterware second."
- "Switchover is planned and lossless; failover is unplanned and may lose data."
- "Every bi-directional table gets a conflict rule before go-live, or replication loops."
- "Top wait event first, top SQL second, one hypothesis, then test."
- "An untested backup is not a backup — restore proves it."
- "Customer impact first, root cause second, stay-fixed third."
- "Compliance is evidence — every privileged action logged and reviewable."
- "My gap is hands-on AWS-native depth versus Oracle internals — closing it with DMS, RDS, and CloudWatch labs in this 10-day plan."
Code drills (narrate before you touch code)
Drill 1 · AWR read: name the bottleneck
Top-5 timed events: gc cr block busy 38%, db file sequential read 22%, CPU 15%. Top SQL by that wait is an order-lookup joining on an unindexed status column. Narrate: top line first, the one fix with biggest payoff, and what you re-measure.
Bug → risk → fix → test. Fix: composite index on the filter+join columns (equality first, range last), then check interconnect if GCS waits persist. Re-measure: AWR top-event share + SQL elapsed time for that sql_id vs baseline. Trap: tuning the I/O the AWR ranks second.
Drill 2 · Buggy RMAN backup shell
#!/bin/sh rman target / <<EOF BACKUP DATABASE; DELETE NOPROMPT OBSOLETE; EOF echo "backup done"
Name every bug, its production risk, the fix, and one test case each — before editing.
Bugs: no archivelog backup (unrecoverable gap) · no controlfile/spfile autobackup check · no VALIDATE or restore test (untested backup) · no retention/RPO match · silent failure (exit code unchecked, no alerting) · credentials/log exposure risk. Fix: archivelogs + autobackup on + restore-to-test proof + set -e with alerting. Test: restore to auxiliary + PITR rehearsal.
Drill 3 · GoldenGate lag check one-liner
Replicat lag is climbing. Write the GGSCI check sequence from memory, state which process the lag belongs to, and the metric that proves recovery.
INFO ALL → LAG EXTRACT * → LAG PUMP * → LAG REPLICAT * + trail-file growth + checkpoint age. Prove with per-process lag back to baseline for a full batch cycle. Trap: restarting replicat before reading the checkpoint.
DB practice (say the query plan before the answer)
- AWR drill order: recite top wait → top SQL → plan compare → baseline vs now → OS attribution, without notes.
- Lag call: write the
V$DATAGUARD_STATStransport-vs-apply lag query from memory and state zero-RPO conditions (SYNC + standby redo + FSFO + transport keeping up). - Plan compare: given
DBMS_XPLAN.DISPLAY_CURSORbefore/after, name the plan change and the fix (baseline pin vs SQL rewrite) in 30 seconds. - Conflict design: given one bi-directional table, name its conflict types (insert-duplicate, update-collision, delete-missing) and its resolution rule before go-live.
- Translation speed round: RAC → ? · Data Guard → ? · GoldenGate → ? · RMAN → ? · AWR/ASH → ? — answer each in under 5 seconds with the trap.
Cheat sheet (condensed — full text in repo)
Method
Understand → Prepare → Identify → Support. Data first, trap ruled out, fix that stays fixed. Say the value it maps to.
RAC triage
Interconnect → quorum (voting disk/OCR) → services (TAF/FAN). Trap: RAC = HA without fencing detail.
DataGuard triage
Transport vs apply lag via V$DATAGUARD_STATS · standby redo sized · FSFO observer + thresholds. Switchover = planned/lossless; failover = unplanned/possible loss.
GoldenGate triage
Extract → pump → replicat status + LAG * · supplemental logging on · per-table conflict rules. Trap: bi-directional loop risk.
AWR/ASH drill order
Top wait → top SQL → plan compare → baseline vs now → OS attribution. awrrpt.sql · ashrpt.sql · addmrpt.sql · DBMS_XPLAN.DISPLAY_CURSOR.
Backup/recovery
RMAN full + incremental + archivelogs · autobackup on · restore-to-test proof · PITR rehearsal · patch ships with rollback owner + timebox.
SOX/PCI lines
Least privilege + quarterly recert · unified auditing with retention + Splunk/Datadog forwarding · key rotation, no secrets in scripts · PII masking. Answer control + evidence + cadence.
Translations
RAC → CORE HA/connectivity framing · Data Guard → RDS Multi-AZ/Global-style standby · GoldenGate → DMS full+CDC · RMAN → RDS snapshots+PITR · AWR/ASH → PI+CloudWatch/OEM.
Mock loop (Power Day — narrate as if the interviewer is the customer)
- Round 1 · DBA scenario triage (20 min): RAC/DataGuard/GoldenGate scenario — Understand → Prepare → Identify → Support aloud. Lead with first data, name the trap ruled out, close with the stay-fixed monitor.
- Round 2 · Job-fit case (15 min): business-driven decision, e.g. payments HA with RTO/RPO trade-off — recommend SYNC + standby redo + rehearsed failover, state the latency cost honestly, deliver incrementally with the product owner.
- Round 3 · Behavioral STAR (15 min): any 2 stories from the STAR bank with real metrics, mapped to Excellence / Do the Right Thing by name. "I", not "we".
- Round 4 · Weakest-answer depth (10 min): pick your weakest answer and defend it three levels deeper than comfortable.
Gap line (say calm): "My gap is hands-on AWS-native depth versus Oracle internals — closing it with DMS, RDS, and CloudWatch labs in this 10-day plan, and where I'd need the cloud team I'll say so."