
Oracle Architecture and Administration
Oracle Database is a complex, multi‑process system that relies on a well‑defined memory architecture and a set of background processes to provide high performance, reliability, and…

When a user issues a COMMIT, which background process guarantees that the transaction’s redo entries are safely written to disk?
A DBA wants to increase the size of the buffer cache without restarting the instance. Which memory management mode must be enabled?
During startup, which file is consulted first to determine the initialization parameters of the instance?
If a user receives ORA-65096 when creating a user in a pluggable database, what is the most likely cause?
Which background process is responsible for cleaning up temporary segments and freeing space after a crash recovery?
A DBA sets SHARED_POOL_SIZE to 256M. Which two structures are directly affected by this change?
When configuring a new Oracle instance, which tool is primarily used to create the initial database files and set basic options?
If the REDO_LOG_BUFFER parameter is set too low, which of the following symptoms is most likely to appear?
Which file contains the network alias definitions that client applications use to connect to an Oracle service?
During a normal shutdown (SHUTDOWN IMMEDIATE), which of the following actions is NOT performed by Oracle?
Understanding Oracle Architecture and Administration
Oracle Database is a complex, multi‑process system that relies on a well‑defined memory architecture and a set of background processes to provide high performance, reliability, and scalability. This course breaks down the key components highlighted in a typical quiz, turning each question into a learning module. By the end of the guide you will be able to identify the purpose of the Shared Pool, know which background process writes redo to disk, configure automatic memory management, and more.
1. The Shared Pool – Where SQL and PL/SQL Live
Question: Which component of the SGA stores the most recent SQL statements and PL/SQL code for reuse?
- Large Pool
- Shared Pool (Correct)
- Buffer Cache
- Java Pool
The Shared Pool is a critical part of the System Global Area (SGA). It contains two main sub‑caches:
- Library Cache – holds parsed SQL statements, PL/SQL code, and execution plans.
- Data Dictionary Cache – stores metadata about database objects.
When a statement is executed, Oracle first checks the Library Cache. If an identical statement already exists, Oracle reuses the existing execution plan, dramatically reducing parsing overhead.
How to Remember: Think of the Shared Pool as a library where the most recent “books” (SQL statements) are kept for quick checkout. The mnemonic “Shared Pool Stores SQL” (triple “S”) reinforces this idea.
2. Log Writer (LGWR) – Ensuring Redo Durability
Question: When a user issues a COMMIT, which background process guarantees that the transaction’s redo entries are safely written to disk?
- PMON (Process Monitor)
- SMON (System Monitor)
- DBWn (Database Writer)
- LGWR (Log Writer) (Correct)
LGWR is responsible for flushing the redo log buffer to the online redo log files. During a COMMIT, LGWR writes all redo entries generated by the transaction to disk before the commit is acknowledged to the client, ensuring durability and recoverability.
Key Takeaway: Without LGWR, committed data could be lost in the event of a crash, violating the ACID properties of the database.
3. Automatic Memory Management (AMM) – Dynamic Buffer Cache Sizing
Question: A DBA wants to increase the size of the buffer cache without restarting the instance. Which memory management mode must be enabled?
- Manual SGA allocation
- Large Pool only
- Java Pool only
- Automatic Memory Management (AMM) (Correct)
AMM, introduced in Oracle 11g, allows the database to automatically resize the buffer cache, shared pool, and other SGA components based on workload. By setting MEMORY_TARGET and MEMORY_MAX_TARGET, the instance can grow or shrink memory allocations on‑the‑fly, eliminating the need for a restart.
Practical Tip: To enable AMM, set MEMORY_TARGET to a value larger than the sum of the default component sizes, and ensure the operating system permits the required shared memory.
4. Initialization Parameter Files – spfile vs. pfile
Question: During startup, which file is consulted first to determine the initialization parameters of the instance?
- spfileSID.ora (Correct)
- initSID.ora (PFILE)
- tnsnames.ora
- listener.ora
The Server Parameter File (spfile) is a binary file that Oracle reads first. It can be modified dynamically with ALTER SYSTEM commands, making it the preferred method for managing parameters in production environments. If the spfile is missing, Oracle falls back to the text‑based init.ora (PFILE).
5. Common Users in a Multitenant Environment
Question: If a user receives ORA‑65096 when creating a user in a pluggable database, what is the most likely cause?
- Insufficient tablespace quota
- Invalid password complexity
- Listener not started
- Missing C## prefix for a common user (Correct)
ORA‑65096 indicates that the user name does not follow the naming convention for a common user. In a CDB (Container Database), common users must begin with the C## prefix (or the prefix defined by COMMON_USER_PREFIX). This rule separates common users (visible across all PDBs) from local users (visible only within a single PDB).
6. SMON – Crash Recovery and Temporary Segment Cleanup
Question: Which background process is responsible for cleaning up temporary segments and freeing space after a crash recovery?
- LGWR (Log Writer)
- SMON (System Monitor) (Correct)
- DBWn (Database Writer)
- PMON (Process Monitor)
SMON performs instance recovery, including the cleanup of temporary segments that were allocated before a crash. It also coalesces free space in the data dictionary and recovers the instance to a consistent state.
7. Impact of SHARED_POOL_SIZE
Question: A DBA sets SHARED_POOL_SIZE to 256M. Which two structures are directly affected by this change?
- Undo Tablespace and Temp Tablespace
- Buffer Cache and Large Pool
- Library Cache and Data Dictionary Cache (Correct)
- Redo Log Buffer and Java Pool
The Shared Pool comprises the Library Cache (SQL and PL/SQL) and the Data Dictionary Cache (metadata). Increasing SHARED_POOL_SIZE allocates more memory to these caches, which can improve parsing performance and reduce library cache misses.
8. Oracle Database Configuration Assistant (DBCA)
Question: When configuring a new Oracle instance, which tool is primarily used to create the initial database files and set basic options?
- Oracle Database Configuration Assistant (DBCA) (Correct)
- Oracle Universal Installer (OUI)
- SQL*Plus
- Enterprise Manager (OEM)
DBCA provides a graphical (or silent) wizard that creates the data files, control files, redo logs, and default tablespaces. It also allows you to choose character sets, memory settings, and sample schemas.
9. Recap of Core Oracle Components
- Shared Pool – Library Cache + Data Dictionary Cache; stores parsed SQL/PLSQL.
- Buffer Cache – Holds frequently accessed data blocks.
- Redo Log Buffer – Temporary storage for redo entries before LGWR writes them.
- Background Processes – LGWR (writes redo), SMON (recovery & cleanup), PMON (process monitoring), DBWn (writes dirty buffers).
- Memory Management – Manual SGA vs. Automatic Memory Management (AMM).
- Initialization Files –
spfile(binary, dynamic) vs.init.ora(text). - Multitenant Naming – Common users need the
C##prefix. - DBCA – Primary tool for creating a new database instance.
10. Frequently Asked Questions (FAQ)
Q: Can I change SHARED_POOL_SIZE without restarting?
A: Yes, if you are using AMM or Automatic Shared Memory Management (ASMM). With AMM, you adjust MEMORY_TARGET; with ASMM, you modify SHARED_POOL_SIZE via ALTER SYSTEM and the instance will resize the pool dynamically.
Q: What happens if LGWR fails?
A: The instance will hang on COMMIT and may eventually shut down. Oracle’s Fast‑Start Failover and Data Guard rely on LGWR to guarantee redo durability.
Q: How do I know if my database is using an spfile?
A: Query SELECT value FROM v$parameter WHERE name='spfile';. If the value is TRUE, the instance is using an spfile.
11. Practical Lab Exercise
To reinforce the concepts, perform the following steps on a test Oracle instance:
- Connect as SYSDBA and verify the current Shared Pool size:
SHOW PARAMETER shared_pool_size; - Increase the Shared Pool using AMM:
ALTER SYSTEM SET memory_target = 2G SCOPE=SPFILE;then restart the instance. - Run a few heavy SQL statements, then query the Library Cache hit ratio:
SELECT name, value FROM v$librarycache; - Force a COMMIT and monitor the LGWR process using
SELECT * FROM v$process WHERE program LIKE '%LGWR%'; - Create a common user in a CDB:
CREATE USER C##ADMIN IDENTIFIED BY password;and observe the naming rule.
Document the observed changes in memory usage and performance metrics.
12. SEO‑Optimized Summary
Mastering Oracle architecture involves understanding the Shared Pool, the role of the Log Writer (LGWR), and how Automatic Memory Management (AMM) simplifies buffer cache tuning. Knowing the order of initialization files (spfile before init.ora) and the naming conventions for common users in a multitenant environment prevents common errors such as ORA‑65096. Finally, leveraging the Oracle Database Configuration Assistant (DBCA) streamlines database creation, ensuring that essential files and memory settings are correctly provisioned from the start.
