Senior Oracle DBA Interview Prep Final
Senior Oracle DBA Interview Prep Final
Explain the Oracle architecture. How does the instance and database interact?
Oracle architecture consists of an Instance (memory + background processes) and a
Database (physical files). The instance includes the SGA (System Global Area) and
background processes like DBWn, LGWR, CKPT, etc. The instance manages access to the
database, which is made up of control files, datafiles, and redo logs. In Oracle 19c/21c,
Multitenant Architecture (CDB/PDB) is common, where the CDB contains shared
components, and each PDB behaves like a self-contained database.
What are key improvements in Oracle 19c/21c that you've worked with?
Automatic Indexing, Read-only Oracle Home, PDB-level recovery, Real-Time Stats,
Blockchain/Immutable Tables (21c), and improved Data Guard management.
Redo logs are filling up quickly. What could be the cause and solution?
Possible causes include high DML activity, insufficient log size, or missing archiving
configuration. Check v$log, v$log_history, and ARCH process. Increase log size, enable
ARCH, and ensure LGWR isn’t bottlenecked. Consider switching to faster storage or
increasing redo log groups.
You see contention on TEMP tablespace. What’s causing it and how do you fix
it?
Common causes: large sorts, hash joins, bad execution plans. Monitor v$tempseg_usage and
v$sql_workarea. Increase TEMP size, enable autoextend, or tune the queries. Consider using
PGA_AGGREGATE_LIMIT to avoid excessive spilling to disk.
Application is locking tables and causing blocking. How do you identify and
resolve it?
Use:
SELECT * FROM v$session WHERE blocking_session IS NOT NULL;
Check v$lock for lock types. Kill offending session if needed. Review application logic to
reduce row-level locking or apply proper indexes.
Sudden spike in CPU usage by Oracle. What’s your response?
Check v$session for high CPU consumers, analyze SQL_IDs. Use AWR/ASH to identify top
SQLs. If necessary, kill runaway sessions. Investigate plan changes, missing stats, or system
overload. Tune SQLs or increase system resources.
You need to enforce encryption for sensitive columns. How do you proceed?
Use Transparent Data Encryption (TDE) for tablespaces or column-level encryption. Set up
Oracle Wallet. Example:
ALTER TABLE employees MODIFY (ssn ENCRYPT USING 'AES256');
Developers request a copy of production for testing. How do you safely provide
it?
Mask sensitive data using Oracle Data Masking, then clone using RMAN or PDB cloning.
Alternatively, use Data Pump export/import with remap and masking procedures. Always
test clone to ensure no real data leaks.
Tough Oracle DBA Interview Questions
Explain the steps to recover from a lost datafile in ARCHIVELOG mode with no
recent backup.
1. Check if the datafile is critical.
2. Try to recover with available archived logs:
STARTUP MOUNT;
RMAN> RESTORE DATAFILE <n>;
RMAN> RECOVER DATAFILE <n>;
ALTER DATABASE OPEN;
3. If no backup, recreate tablespace if non-critical or restore full DB to another server and
extract missing data.
What’s the difference between SCN, checkpoint, and redo log sequence?
SCN (System Change Number) tracks database changes.
Checkpoint marks a synchronization point between memory and disk.
Redo log sequence numbers identify the chronological order of redo logs. They're related
but serve different purposes in recovery.
Explain how you would upgrade a RAC environment from 12c to 19c.
1. Review Oracle documentation and certification matrix.
2. Backup GI and DB.
3. Upgrade GI first using runInstaller.
4. Upgrade database using DBUA or manually (preupgrade.jar, datapatch).
5. Handle post-upgrade tasks (stats, timezone).
6. Validate RAC services, listeners, and CRS status.