Skip to main content
Oracle Database Interview Questions
Oracle Database Interview Questions
1) Oracle Architecture & Internals (Core) — 25
- Explain Oracle instance vs database and the lifecycle of each.
- What are the major background processes (PMON, SMON, DBWn, LGWR, CKPT, MMON) and their roles?
- Describe SGA components (Shared Pool, Buffer Cache, Large Pool, Redo Log Buffer, Java Pool, Streams Pool).
- How does PGA differ from UGA? Where is UGA stored in dedicated vs shared server mode?
- Explain redo generation, LGWR behavior, and commit processing.
- What is a checkpoint? How does CKPT coordinate file headers and controlfiles?
- Describe buffer cache management (LRU, touch count, dirty buffers, checkpoints).
- What is SCN? How is it advanced and used during recovery/consistency?
- How does Oracle ensure read consistency using UNDO?
- What are ITL slots? How do they affect concurrency and TX enqueues?
- Explain row chaining vs row migration and their performance implications.
- What are latch vs lock vs enqueue? Give examples and troubleshooting steps.
- Draw the parse → optimize → execute pipeline; where do hard/soft parses happen?
- How are library cache and data dictionary cache maintained?
- What is result cache? When does it help or harm?
- Explain multiplexing of controlfiles and redo logs; why is it critical?
- What are Wait Events and Time Model Statistics? How do you use them together?
- How does the Database Writer choose how many DBWn processes to spawn?
- What is Adaptive Shared Memory Management (ASMM) vs AMM? When to choose which?
- What are System/Session statistics (v$sesstat/v$sysstat) you monitor during incidents?
- Explain how Oracle handles direct path reads/writes.
- What is a segment header? Describe freelists and ASSM bitmap blocks.
- Explain Smart Scans on Exadata and why they are sometimes disabled.
- What changed significantly between 11g, 12c, 19c in optimizer/adaptive features?
- Describe how ORA-600/ORA-7445 are triaged (incident packaging, ADRCI).
2) Multitenant: CDB/PDB — 22
- Architecture differences between non-CDB and CDB with PDBs.
- What lives in CDB$ROOT vs PDB$SEED vs each PDB?
- What are local vs common users/roles? Practical constraints?
- How do you plug/unplug a PDB and validate compatibility?
- PDB cloning (local vs remote): steps and pitfalls.
- How do you enable automatic PDB open on instance startup (SAVE STATE vs triggers)?
- Explain PDB lockdown profiles and typical restrictions.
- PDB hot cloning — what gets copied and what doesn’t?
- How is UNDO managed (shared vs local UNDO in a CDB)?
- How do you perform PDB PITR using RMAN?
- What is a proxy PDB? When would you use it?
- How do you manage AWR per PDB?
- How does resource management differ per PDB (CDB Resource Manager)?
- How are services configured per PDB for routing?
- Patching CDB with multiple PDBs — what is the safe sequence?
- What happens to common objects and metadata during plug/unplug?
- How do you clone a PDB across different character sets/endian issues?
- Troubleshoot a PDB stuck in MOUNTED with undo issues.
- How to restrict a DBA in a PDB from accessing CDB$ROOT.
- Strategy for cross-version migrations using PDB unplug/plug.
- Explain dictionaries and catalog views that are PDB-aware (CDB_, DBA_).
- How do you backup/restore a single PDB (hot) with minimal impact?
3) ASM & Storage — 20
- ASM architecture: instance, diskgroups, failure groups, templates, rebalancing.
- How does ASM allocate extents (AU/extent stripes) and manage striping/mirroring?
- Normal vs high vs external redundancy — tradeoffs and use cases.
- ASM rebalancing triggers and tuning (POWER LIMIT).
- Migrating from filesystem to ASM (datafiles, online logs, controlfiles).
- Fixing disks with poor performance in ASM — identifying candidates.
- Converting a diskgroup from external to normal redundancy (options).
- ASM metadata corruption — detection and recovery strategies.
- Best practices for FRA placement and sizing in ASM.
- What is ASMLIB vs UDEV for device persistence?
- How to move TEMP files into ASM and validate throughput.
- Co-locating redo logs vs datafiles — considerations.
- Bigfile tablespaces pros/cons and use cases.
- How to size redo logs for a write-heavy workload.
- Monitoring I/O service times via AWR/ASH and ASM views.
- Consequences of disk drop timing and diskgroup repair timer.
- ASM instance startup dependencies in RAC/GI.
- ACFS — when to use and how it differs from ASM file access.
- Detecting and resolving allocation/preferred read issues in extended clusters.
- Strategies for ASM performance testing and baselining.
4) RMAN & Recovery — 25
- RMAN architectural components (channels, SBT, controlfile/catalog).
- Backups: image copies vs backup sets — benefits and when to use.
- Full vs incremental vs cumulative incremental — design strategies.
- Incremental merge — how it works and when to implement.
- Using block change tracking — benefits and caveats.
- Configuring retention policy with FRA pressure and archival policies.
- Crosscheck vs catalog; what problems they solve.
- Controlfile autobackup — how and when to rely on it.
- Restore/recover to new host with limited metadata (disaster recovery drill).
- DUPLICATE FROM ACTIVE DATABASE — requirements and failure points.
- TSPITR end-to-end — restore, aux instance, metadata cleanup.
- Block media recovery — detection (v$database_block_corruption) and fix.
- PITR to SCN/time/sequence — validation steps.
- Encrypted backups — key rotation and cross-host restore testing.
- Parallelization and section size for large files.
- RMAN/Flashback Database — choosing between them for user error rollback.
- Channel configuration, throughput tuning, and backup window planning.
- Handling catalog corruption/out-of-sync scenarios.
- Restoring single PDB from CDB backups.
- Transporting tablespaces with RMAN — checks and metadata.
- Handling missing archived logs (incremental to roll forward).
- Validating backup integrity (RESTORE VALIDATE, cross-platform tests).
- Backup lifecycle automation and reporting (daily checks/aging).
- Performance bottlenecks in backup (media vs network vs DB read).
5) Data Guard & DGMGRL — 25
- Physical vs Logical standby — internal mechanics and limitations.
- Redo transport (ARCn, LNSn) and RFS — how they interact.
- Real-time apply and log shipping modes — how to enable/verify.
- Standby redo logs — sizing, number, and placement.
- FSFO architecture — observer requirements and behaviors.
- Switchover vs failover — prechecks, postchecks, and validation.
- Flashback for reinstating a failed primary — steps and gotchas.
- Diagnosing apply lag — SQL apply vs redo apply causes.
- Handling archive gaps and strategies for gap resolution.
- Protect mode (Max Performance/Availability/Protection) — latency and loss tradeoffs.
- Far Sync instances — use cases and configuration guidelines.
- DGMGRL broker configuration — key commands and diagnostics.
- Multi-standby topologies — cascading and hub/spoke.
- Read-only workload on standby — service design and routing.
- Detecting lost writes and preventing silent divergence.
- Upgrades with Data Guard (transient logical, DBMS_ROLLING).
- SSL/TLS for redo transport — configuration and testing.
- Troubleshooting LNS timeouts and NET_TIMEOUT settings.
- Broker status codes (ORA-168xx) — common root causes.
- Handling standby role transitions for PDB services.
- Using Flashback Database to undo logical errors at primary.
- Tuning redo send/receive and apply for WAN links.
- Monitoring key views for health (v$dataguard_stats, v$managed_standby).
- Testing DR with minimal app interruption.
6) Oracle RAC / Grid Infrastructure — 25
- Clusterware architecture — CRS, OHASD, agents, OCR, voting disks.
- SCAN listeners — purpose, DNS dependencies, and client-side effects.
- Role of GES/GCS and Cache Fusion during consistent reads.
- Diagnosing node eviction — CSSD logs, OSWatcher, TFA usage.
- Services — preferred/available instances, failover policies (TAF/FCF/AC).
- Load balancing advisory and connection pooling best practices.
- Adding/removing RAC nodes — steps and checks.
- Rolling patching — GI vs DB homes, and zero downtime strategies.
- Understanding
gc cr request and gc buffer busy waits and remediation. - Interconnect configuration — bonding, jumbo frames, HAIP, and tests.
- VIP and public IP behavior during failover; client-side retry.
- OCR backup/restore and disaster handling.
- srvctl/crsctl basics — start/stop/status scripting and dependencies.
- RAC One Node — online relocation and use cases.
- NUMA and instance placement — CPU pinning for RAC performance.
- Diagnosing library cache or enqueue contention in RAC.
- Service-level isolation for hot schemas (cardinality skew).
- ASM on RAC — role separation and instance startup orchestration.
- Diagnosing CRS resource flapping and dependencies.
- TAF vs Application Continuity — differences and selection.
- Cluster startup order and custom resource registration.
- PDB awareness in RAC and service mapping.
- RAC failover testing runbooks (planned/unplanned).
- Inter-node latency measurement and its impact on Cache Fusion.
- Using AWR Compare Periods Across Instances for hotspots.
7) SQL Optimizer & Execution Plans — 25
- Cost-based Optimizer (CBO) — inputs and selectivity calculation.
- Bind peeking and adaptive cursor sharing — when it helps/hurts.
- SQL Plan Baselines — capture, evolve, and fix regressions.
- SQL Profiles vs Baselines vs Outlines — differences.
- Histograms (frequency/top-frequency/height-balanced) and their pitfalls.
- Extended statistics (column groups) — when to use.
- Adaptive plans and dynamic sampling — version differences.
- Cardinality feedback — how and when it kicks in.
- Join methods (NL, Hash, Sort Merge) — selection and tuning.
- Star transformations and bitmap indexes in DW workloads.
- Scalar subquery unnesting and correlated subqueries.
- SARGability — function-based indexes vs rewriting predicates.
- Query block hints and their safe usage.
- Detecting and fixing plan instability across instances.
- Auto DOP and parallel execution policies — skew and distribution.
- Using DBMS_XPLAN and SQL Monitor for runtime stats.
- Why EXPLAIN PLAN can be misleading vs actual.
- Impact of stale or missing stats on joins and filters.
- Inlining PL/SQL and SQL macros (19c/21c) — performance impacts.
- Managing optimizer_features_enable across schemas/apps.
- Result cache hints and session parameters.
- GTT vs temp vs result cache for intermediates.
- JSON/XML indexing and path-based access plans.
- Partition-wise joins and pruning — necessary preconditions.
- Diagnosing hard-parse storms and cursor cache misses.
8) Performance (AWR/ASH/ADDM/Stats) — 25
- AWR report anatomy — where you begin and why.
- Top wait classes and mapping to subsystems (CPU, I/O, Concurrency).
- ASH sampling — reading sessions on CPU vs waiting.
- ADDM recommendations — when to trust and when to ignore.
- Segment-level stats — top logical/physical I/O segments.
- SQL-level stats — finding top SQL by DB time.
- Session history — reconstructing an incident timeline.
- LIO vs PIO ratios — what “good” means for OLTP vs DW.
- log file sync spikes — diagnosing commit frequency/app patterns.
- latch free/enqueue contention — real cases and fixes.
- Buffer cache hit ratio myths — what to look at instead.
- Measuring concurrency via enq: TX and row-level locks.
- Temp usage spikes — operations causing them and mitigation.
- Parallel execution issues — PX allocation, QC/Slave waits.
- Library cache lock/pin hot spots — detection and relief.
- Cursor sharing forced — side effects and alternatives.
- Baseline creation (AWR baselines) and comparison.
- SGA/PGA sizing methodology — avoiding over/under allocation.
- Tracking memory usage with V$MEMORY_TARGET_ADVICE and friends.
- Capturing and comparing execution statistics across deployments.
- Using SQLT/SPA for regression testing.
- Diagnosing I/O issues via AWR I/O profiles and ASM metrics.
- Using OEM/Cloud Control performance pages effectively.
- Designing SLIs/SLOs for Oracle performance.
9) Space, Segments, Undo, Temp — 20
- Undo tablespace sizing — retention tuning for long queries.
- ORA-01555 (snapshot too old) — common root causes and mitigations.
- ITL waits and INITRANS/PCTFREE tuning.
- Shrink space vs move/online move — index rebuild implications.
- Segment advisor — how to read and act on recommendations.
- Detecting row chaining/migration and table redesign strategies.
- LOB storage: BASICFILE vs SECUREFILE — dedup/compress and read/write impact.
- Tempfile sizing and placement for heavy sorts/hashes.
- ORA-01652 unable to extend temp segment — tactical fixes.
- Partitioning strategy for large segments and maintenance.
- Online table redefinition vs edition-based redefinition — choices.
- Monitoring freelists vs ASSM bitmaps for hot objects.
- Compress for OLTP vs HCC — tradeoffs and licensing.
- Segment-level encryption with TDE — overhead considerations.
- Detecting high water mark issues and reclaiming space.
- Space usage tracking in CDB/PDB across services.
- Managing growth forecasts — capacity planning methods.
- Minimizing redo/undo during bulk loads.
- Reclaiming space after mass delete — approach without outages.
- Managing extremely wide tables (100+ columns) efficiently.
10) Security, Auditing, TDE, Vault — 20
- Unified Auditing — policy design and log retention.
- Database Vault — use cases to separate duties from DBAs.
- TDE: tablespace vs column encryption — performance differences.
- Wallet management — auto-open, key rotation, restore tests.
- Fine-Grained Auditing (FGA) on sensitive tables — design pitfalls.
- Virtual Private Database (VPD) — policy functions and performance.
- Data Redaction vs VPD — differences and when to use which.
- Password policies, profiles, and verification functions.
- Locking down powerful packages (UTL_FILE/HTTP) and external jobs.
- Auditing SYS operations and protecting audit trails.
- Managing and auditing database links.
- Least-privilege design for app schemas in PDBs.
- Common vs local users — privilege boundaries.
- Protecting SYS.USER$ and hashing algorithms history.
- Securing listener (TCPS), valid node checking, and ACLs.
- Handling security in mixed CDB/PDB with different tenants.
- Encryption of backups and keys off-box (OKV/OCI Vault).
- Detecting privilege creep and drift over time.
- GDPR/PII architectural controls at DB layer.
- Handling compromised credentials — emergency response.
11) Exadata & Oracle Cloud (OCI/Autonomous) — 18
- Exadata storage cells — Smart Scan, storage indexes, offload.
- When Smart Scan is disabled and how to re-enable.
- EHCC types and workload fit; migration considerations.
- Cell metrics and AWR cell-specific views.
- Network and I/O layout best practices on Exadata.
- Autonomous DB — architecture, auto-indexing, and limitations.
- Differences between Autonomous Shared vs Dedicated.
- OCI DBCS vs ExaCS vs Autonomous — choosing the right service.
- Data Guard in OCI — cross-AD and cross-region.
- Key management with OCI Vault and rotation plans.
- ZDM (Zero Downtime Migration) — flow and blockers.
- GoldenGate to OCI targets — design patterns.
- AWR Hub / AWR Warehouse in cloud — benefits for fleets.
- Cost control in cloud (IOPS, backups, standby, licensing).
- Private endpoints and network security groups for DB access.
- Patching automation in cloud services — guardrails.
- Using Fleet Patching & Provisioning (FPP) for estates.
- Observability stack in OCI (OCI Monitoring/Logging) for DB signals.
12) Real-World Troubleshooting & Scenarios — 25
- Database slow during peak — end-to-end triage steps you follow.
- High “log file sync” — how to isolate app vs storage causes.
- RAC node eviction at random — what logs and counters first?
- Data Guard apply lag increases at peak — isolate sender/receiver/apply.
- PDB can’t open due to UNDO issues — safe recovery plan.
- Library cache lock storms — what typically causes them?
- Row-level locking chain — how to find the blockers and design changes.
- ORA-4031 shared pool/PGA issues — step-by-step remediation.
- ORA-600/7445 crash — triage, reproduce, and engage support with artifacts.
- RMAN restore too slow — where is the bottleneck?
gc waits spike after new release — what changed?- Massive temp usage during ETL — structural fixes beyond adding temp.
- Plan regression after stats gather — stabilize without freezing stats.
- Archive log generation doubled overnight — isolate SQL/PLSQL changes.
- Undo space errors for long reports — alternative designs.
- RAC interconnect saturation — detect and remediate.
- High latch/ITL contention on a hot table — schema and initrans approach.
- PDB-level resource abuse — cap and shape workloads.
- DG switchover succeeded but apps fail to connect — what was missed?
- AWR shows CPU-bound but low TPS — interpretation and action.
- ASH shows high concurrency on a single segment — design alternatives.
- Heavy parse time CPU — why and how to reduce?
- “Snapshot too old” despite large undo — root cause patterns.
Comments
Post a Comment