Explain Oracle Database Architecture. Easy
Oracle Database architecture is divided into two main components: the Instance and the Database. Many candidates confuse these two, but understanding this distinction is critical for certification interviews.
1. Oracle Instance
The instance consists of memory structures and background processes. It is the engine that runs the database.
Memory Components:
Background Processes:
2. Oracle Database
The database refers to physical files stored on disk:
Real-world scenario:
If the instance crashes but datafiles remain intact, recovery is possible because redo logs replay committed transactions.
Interview Tip:
If interviewer asks βWhat happens during startup?β - explain NOMOUNT, MOUNT, OPEN stages.
What is the difference between Oracle Instance and Database? Easy
This is a classic certification question.
Instance = Memory + Background processes.
Database = Physical files on disk.
The instance starts first. It then mounts and opens the database.
If instance shuts down, files still exist on disk. Without instance, database cannot be accessed.
Example:
Multiple instances can access one database in RAC environment.
Explain the role of Control File. Medium
The control file is one of the most critical files in Oracle.
It contains metadata about:
If control file is lost, database cannot start.
How to check control file location:
SHOW PARAMETER control_files;
Best Practice:
Always multiplex control files across multiple disks.
Explain Redo Log files and their importance. Medium
Redo logs record all changes made to the database. They are essential for recovery.
Every DML operation generates redo entries stored in Redo Log Buffer, then written by LGWR to redo log files.
In case of crash, Oracle uses redo logs to replay committed transactions.
Important Concepts:
Production Example:
In financial systems, redo logs ensure zero data loss when properly archived.
What is Archive Log Mode? Medium
Archive Log Mode allows Oracle to archive redo logs before overwriting them.
This enables:
Enable Archive Mode:
SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
Without archive mode, recovery options are limited.
Explain Oracle Memory Structure (SGA and PGA). Hard
Oracle memory is divided into SGA and PGA.
SGA Components:
PGA:
Private memory for session operations like sorting and hashing.
Check memory usage:
SELECT * FROM V$SGAINFO;
What are Oracle Background Processes? Easy
Oracle background processes handle database operations automatically.
In RAC, additional processes like LMS appear.
What is Checkpoint in Oracle? Medium
A checkpoint is the process of synchronizing database buffers with datafiles.
CKPT updates control file and datafile headers with latest SCN.
Frequent checkpoints reduce crash recovery time.
Explain Datafiles and Tablespaces. Easy
Datafiles store actual table data physically.
Tablespaces are logical storage units mapped to datafiles.
One tablespace can have multiple datafiles.
Create tablespace:
CREATE TABLESPACE users DATAFILE 'users01.dbf' SIZE 500M;
What is SCN in Oracle? Hard
SCN (System Change Number) is a logical timestamp used by Oracle for consistency and recovery.
Every committed transaction gets an SCN.
Used in:
Check current SCN:
SELECT CURRENT_SCN FROM V$DATABASE;
How do you create and manage users in Oracle? Easy
User management is one of the primary responsibilities of a DBA.
Creating a user:
CREATE USER john IDENTIFIED BY password DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA 100M ON users;
This command defines authentication, default tablespace, temporary tablespace, and storage quota.
Grant privileges:
GRANT CONNECT, RESOURCE TO john;
Lock/Unlock user:
ALTER USER john ACCOUNT LOCK; ALTER USER john ACCOUNT UNLOCK;
Real-world DBA scenario:
In enterprise environments, we rarely grant system privileges directly. We use roles for better control and auditing.
Interview Tip:
Mention principle of least privilege.
Explain System Privileges vs Object Privileges. Easy
This question checks your understanding of Oracle security model.
System Privileges:
Allow users to perform database-wide actions.
Object Privileges:
Allow actions on specific objects.
Example:
GRANT SELECT ON hr.employees TO john;
Certification Insight:
OCP often tests difference between WITH GRANT OPTION and WITH ADMIN OPTION.
What are Roles in Oracle? Medium
Roles are collections of privileges grouped together for easier management.
Instead of granting privileges individually, DBAs create roles and assign them to users.
Create Role:
CREATE ROLE app_role; GRANT SELECT, INSERT ON hr.employees TO app_role; GRANT app_role TO john;
Why use roles?
What is a Profile in Oracle? Medium
Profiles control password policies and resource limits for users.
Example:
CREATE PROFILE secure_profile LIMIT FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LIFE_TIME 60 PASSWORD_LOCK_TIME 1;
Assign Profile:
ALTER USER john PROFILE secure_profile;
Real-world usage:
Used to enforce enterprise password rotation and security compliance.
Explain Password Management in Oracle. Medium
Oracle supports advanced password management using profiles and password verify functions.
Key parameters:
Enable password complexity:
Oracle provides default VERIFY_FUNCTION.
Enterprise Example:
Financial institutions mandate password expiry every 30 days.
What is Auditing in Oracle? Hard
Auditing tracks database activities for security and compliance.
Oracle supports:
Enable auditing:
AUDIT SELECT TABLE BY john;
Audit records stored in DBA_AUDIT_TRAIL.
Certification Tip:
Know difference between traditional auditing and Unified Auditing.
Explain Unified Auditing in Oracle. Hard
Unified Auditing consolidates all auditing into a single framework.
It replaces traditional AUDIT commands in newer versions.
Check unified auditing:
SELECT * FROM V$OPTION WHERE PARAMETER = 'Unified Auditing';
Enterprise Benefit:
Improved performance and centralized security logs.
How do you revoke privileges? Easy
Revoking privileges removes previously granted access.
Example:
REVOKE SELECT ON hr.employees FROM john;
If privilege granted WITH GRANT OPTION, revocation cascades.
What is the difference between WITH GRANT OPTION and WITH ADMIN OPTION? Medium
This is a very common certification question.
WITH GRANT OPTION:
Used for object privileges. Allows user to grant object privilege to others.
WITH ADMIN OPTION:
Used for system privileges and roles. Allows granting system privileges to others.
How do you monitor user sessions? Hard
Monitoring sessions helps DBAs identify performance or blocking issues.
Check active sessions:
SELECT SID, SERIAL#, USERNAME, STATUS FROM V$SESSION;
Kill session:
ALTER SYSTEM KILL SESSION 'sid,serial#';
Production Example:
Long-running sessions can block business transactions.
What is RMAN in Oracle? Easy
RMAN (Recovery Manager) is Oracle's built-in utility for backup and recovery operations.
Why RMAN?
Basic RMAN Backup:
RMAN> BACKUP DATABASE;
Enterprise Insight:
In production, backups are usually automated via shell scripts and scheduled through cron or OEM.
Explain Types of Backups in Oracle. Medium
Oracle supports multiple backup types:
1. Full Backup - Complete database backup.
2. Incremental Backup - Only changed blocks since last backup.
3. Differential Incremental - Changes since last level 1 backup.
4. Cumulative Incremental - Changes since last level 0 backup.
Example:
BACKUP INCREMENTAL LEVEL 0 DATABASE; BACKUP INCREMENTAL LEVEL 1 DATABASE;
Certification Tip:
Understand difference between Level 0 and Level 1 backups.
What is Archivelog Mode? Hard
Archivelog mode allows redo logs to be archived for recovery purposes.
Check Mode:
ARCHIVE LOG LIST;
Enable Archivelog:
SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
Why Important?
Required for point-in-time recovery.
Explain Flashback Technology. Hard
Flashback allows viewing or restoring database objects to a previous state.
Types:
Example:
SELECT * FROM employees AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '5' MINUTE);
Production Benefit:
Reduces need for full restore in accidental delete cases.
What is Data Pump? Medium
Data Pump (expdp/impdp) is used for logical backup and migration.
Export Example:
expdp system/password DIRECTORY=dp_dir DUMPFILE=backup.dmp LOGFILE=exp.log FULL=Y;
Import Example:
impdp system/password DIRECTORY=dp_dir DUMPFILE=backup.dmp LOGFILE=imp.log;
Use Case:
Schema migration, database upgrades.
Difference between Physical and Logical Backup? Medium
Physical Backup:
Logical Backup:
Certification Insight:
RMAN is preferred for production backup strategy.
How do you perform Point-In-Time Recovery? Hard
Point-In-Time Recovery (PITR) restores database to a specific time before failure.
RMAN Example:
RUN {
SET UNTIL TIME "TO_DATE('2026-02-10 10:00:00', 'YYYY-MM-DD HH24:MI:SS')";
RESTORE DATABASE;
RECOVER DATABASE;
}
Enterprise Scenario:
Used after accidental mass data deletion.
What is Control File and why is it important? Hard
Control file stores metadata about database structure.
Contains:
Backup Control File:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Loss of control file prevents database startup.
What is Redo Log and its purpose? Easy
Redo logs record all database changes.
Used for crash recovery.
Key Concepts:
Check Logs:
SELECT * FROM V$LOG;
What is Disaster Recovery strategy in Oracle? Hard
Disaster Recovery ensures business continuity during catastrophic failure.
Common strategies:
Enterprise Example:
Primary DB in Mumbai, Standby DB in Bangalore data center.
What is AWR in Oracle? Medium
AWR (Automatic Workload Repository) is a performance diagnostic tool that captures database workload statistics.
What it collects:
Generate AWR Report:
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
Real-world usage:
DBAs analyze AWR reports to identify top SQL consuming resources.
What is ADDM? Medium
ADDM (Automatic Database Diagnostic Monitor) analyzes AWR data and provides tuning recommendations.
It helps identify:
Enterprise Note:
ADDM is automatically executed after each AWR snapshot.
How do you identify Top SQL queries? Medium
To identify high resource-consuming SQL:
Query V$SQL:
SELECT sql_text, executions, buffer_gets FROM v$sql ORDER BY buffer_gets DESC;
In production:
Check AWR report βTop SQL by Elapsed Timeβ.
What are Wait Events in Oracle? Hard
Wait events indicate why a session is waiting.
Examples:
Check Wait Events:
SELECT event, total_waits FROM v$system_event;
DBA Insight:
High wait times signal performance bottlenecks.
Explain Types of Indexes in Oracle. Easy
Indexes improve query performance.
Main Types:
Create Index:
CREATE INDEX emp_idx ON employees(emp_id);
Certification Tip:
Bitmap indexes are ideal for low-cardinality columns.
What is Explain Plan? Medium
Explain Plan shows how Oracle executes a query.
Example:
EXPLAIN PLAN FOR SELECT * FROM employees WHERE emp_id = 100; SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
Use Case:
Helps verify whether index is being used.
What is SGA in Oracle? Easy
SGA (System Global Area) is shared memory for database instance.
Components:
Check SGA:
SHOW PARAMETER sga;
What is PGA in Oracle? Easy
PGA (Program Global Area) is private memory allocated per process.
Used for:
Check PGA:
SHOW PARAMETER pga;
How do you tune memory in Oracle? Hard
Memory tuning involves optimizing SGA and PGA allocation.
Automatic Memory Management:
SHOW PARAMETER memory_target;
Manual Tuning:
Production Insight:
Monitor memory advisory views for recommendations.
What is Cursor Sharing? Medium
Cursor sharing determines how SQL statements reuse execution plans.
Parameter:
SHOW PARAMETER cursor_sharing;
Values:
Best Practice:
Use bind variables to avoid hard parsing overhead.
What is Oracle Data Guard? Medium
Oracle Data Guard is a disaster recovery solution that maintains standby databases synchronized with the primary database.
Key Benefits:
Types of Standby:
Real-world use:
Used in production systems to ensure minimal downtime during failures.
Difference between Physical and Logical Standby? Medium
Physical Standby:
Exact copy of primary database using redo apply.
Logical Standby:
Uses SQL apply and allows read/write access for certain operations.
Key Difference:
What is Switchover and Failover in Data Guard? Hard
Switchover:
Planned role reversal between primary and standby.
Failover:
Unplanned switch due to primary database failure.
DBA Note:
Switchover = zero data loss.
Failover may cause minimal data loss depending on configuration.
What is Oracle RAC? Medium
Oracle RAC (Real Application Clusters) allows multiple instances to run on different servers accessing the same database.
Benefits:
Real-world Example:
Used in enterprise banking and telecom systems for continuous uptime.
What is Cache Fusion in RAC? Hard
Cache Fusion allows data blocks to be shared across RAC instances without writing to disk.
How it works:
What is ASM in Oracle? Medium
ASM (Automatic Storage Management) manages database storage efficiently.
Advantages:
ASM Disk Groups:
DATA, FRA, etc.
How do you apply patches in Oracle? Hard
Oracle uses OPatch utility for patching.
Steps:
opatch lsinventory opatch apply
Best Practice:
Always backup before patching and test in staging environment.
How do you upgrade an Oracle Database? Hard
Database upgrade can be performed using:
Pre-upgrade checks:
How do you monitor Oracle database performance? Medium
Monitoring tools include:
Common Monitoring Query:
SELECT * FROM v$session;
How do you troubleshoot a slow database? Hard
Step-by-step approach:
Golden Rule:
Never tune blindly - always analyze metrics first.
How do you perform point-in-time recovery (PITR) in Oracle? Hard
Point-in-Time Recovery (PITR) allows restoring the database to a specific time before failure.
When used:
RMAN Example:
RUN {
SET UNTIL TIME "TO_DATE('2026-02-10 10:30:00','YYYY-MM-DD HH24:MI:SS')";
RESTORE DATABASE;
RECOVER DATABASE;
}
Important: Database must be in ARCHIVELOG mode.
What is Flashback Database? Medium
Flashback Database allows you to rewind the database to a previous state without restoring backups.
Advantages:
Enable Flashback:
ALTER DATABASE FLASHBACK ON;
Recovery Example:
FLASHBACK DATABASE TO TIMESTAMP ...
How do you handle ORA-01555 Snapshot Too Old error? Hard
ORA-01555 occurs when undo data required for consistent read is overwritten.
Common Causes:
Solutions:
How do you troubleshoot RAC node eviction? Hard
Node eviction in RAC usually happens due to:
Steps:
How do you secure Oracle database at the network level? Medium
Network security can be implemented using:
Enable encryption:
Modify sqlnet.ora file.What is Transparent Data Encryption (TDE)? Hard
TDE encrypts data at rest inside database files.
Types:
Benefit: Protects data even if storage is stolen.
How do you detect blocking sessions? Medium
Blocking sessions cause performance issues.
Query:
SELECT blocking_session, sid FROM v$session WHERE blocking_session IS NOT NULL;
Resolution:
How do you analyze AWR report? Hard
AWR report provides performance statistics.
Focus Areas:
Tip: Always compare with baseline.
How do you handle database corruption? Hard
Database corruption may be physical or logical.
Steps:
RMAN Example:
RECOVER DATAFILE 5 BLOCK 10;
How do you perform capacity planning for Oracle database? Medium
Capacity planning ensures future scalability.
Analyze:
Best Practice: Monitor monthly growth and forecast yearly requirements.
Explain Oracle Data Guard architecture in detail. Hard
Oracle Data Guard provides disaster recovery and high availability by maintaining synchronized standby databases.
Components:
Process Flow:
Protection Modes:
In interviews, always explain synchronous vs asynchronous redo transport.
What is Active Data Guard? Medium
Active Data Guard allows read-only queries on standby while redo is being applied.
Benefit:
Requires separate license.
How do you troubleshoot redo transport lag in Data Guard? Hard
Redo lag can occur due to network latency or I/O bottlenecks.
Steps:
High redo generation often requires bandwidth upgrade.
Explain ASM architecture. Medium
ASM (Automatic Storage Management) manages Oracle database files efficiently.
Main Components:
Advantages:
How do you rebalance ASM disk group? Hard
Rebalancing happens automatically when disks are added or removed.
Manual Trigger:
ALTER DISKGROUP DATA REBALANCE POWER 8;
Higher POWER value increases rebalance speed but consumes CPU.
Explain Multitenant Architecture (CDB/PDB). Medium
Oracle Multitenant architecture consists of:
Benefits:
Interview Tip: Explain how to unplug and plug PDB.
How do you clone a PDB? Medium
PDB cloning allows quick database provisioning.
Command:
CREATE PLUGGABLE DATABASE pdb_clone FROM pdb1;
Used in testing and DevOps pipelines.
What is SQL Plan Baseline? Hard
SQL Plan Baseline ensures consistent execution plans.
Use Case:
Stored in SQL Management Base.
How do you troubleshoot high CPU usage in Oracle? Hard
High CPU usage investigation steps:
Most common cause: full table scans on large tables.
Explain complete disaster recovery strategy for enterprise Oracle environment. Hard
A complete DR strategy includes:
1. Backup Strategy
2. Data Guard for HA
3. Flashback for Logical Failures
4. Regular DR Drills
5. RPO & RTO Definition
Enterprise interviews expect discussion on business impact analysis and SLA alignment.
Join our live classes with expert instructors and hands-on projects.
Enroll NowCustomized Corporate Training Programs and Developing Skills For Project Success.
Subscibe to our newsletter and we will notify you about the newest updates on Edugators