0% found this document useful (0 votes)
2 views

Database Administration and Management Lecture 5

Uploaded by

Amina Baig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Database Administration and Management Lecture 5

Uploaded by

Amina Baig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Database

Administration and
Management
Exploring Large Pool and Oracle Processes
Startup and Shutdown Database Processes
Lecture # 5
Objectives:
• Understand the purpose and role of Large Pool in Oracle
databases.
• Explore key Oracle processes and their responsibilities.
• Learn the steps and modes of database startup and
shutdown.

Why It Matters:
• Optimizing memory allocation enhances database
performance.
• Smooth startup and shutdown prevent data loss and
downtime.
• Oracle processes form the backbone of database operations.
Oracle Memory Architecture
SGA Components Overview:
Shared Pool: Caches SQL statements and execution
plans.
Large Pool: Handles RMAN, parallel execution, and
more.
Buffer Cache: Stores data blocks for queries.
Redo Log Buffer: Temporarily stores redo entries.
Large Pool in Oracle
What is the Large Pool?
Optional memory component in the System Global Area
(SGA).
Reduces traffic or "competition" in the shared pool by
offloading certain operations to help improve
performance.

Key Operations Supported:


Backup and restore with RMAN.
Parallel query execution.
Message buffers in Oracle Streams and Advanced
Queuing.
When Should You Configure the Large Pool?
The Large Pool is especially useful in the following situations:
● When your database is running heavy backup or restore operations
using RMAN.
● When you have complex queries that require parallel processing
(for instance, in a data warehousing environment).
● When you’re using Oracle Streams or Advanced Queuing for
message-based communication.
If your database is not performing these kinds of operations
frequently, you may not need to configure the Large Pool.
Configuring the Large Pool
Initialization Parameters:
Default configuration is often insufficient for large operations.
Example:
ALTER SYSTEM SET large_pool_size = 256M SCOPE=SPFILE;

Dynamic View Check:


SELECT * FROM V$SGA_DYNAMIC_COMPONENTS WHERE COMPONENT
= 'LARGE_POOL';
The size and amount of memory being used by the Large Pool at the
moment.

Tuning Tip:
Monitor memory usage during RMAN or parallel tasks to adjust the size
appropriately.
Advanced Use Cases for Large Pool
Parallel Query Execution:
Allocates memory for query results and inter-process
communication.
RMAN Backup/Restore:
Memory-intensive operations with minimal shared pool
impact.
Shared Server Processes:
Stores session-specific data for high-concurrency
systems.
Oracle Streams:
Buffers for advanced queuing and messaging.
Temporary memory spaces where messages or data can
be stored before being processed or sent.
Oracle Processes Overview
Background and Server Processes:
Essential for database operations.
DBWn: Writes modified blocks from buffer cache to data files.
Optimized for performance to minimize I/O
operations.
LGWR: Critical for transaction durability. Writes redo logs for
committed transactions.
SMON: Handles crash recovery and instance recovery.
PMON: Cleans up after failed processes and releases locked
resources.
CKPT: Updates control files and ensures consistency during
database writes.
Server Processes Deep Dive
Dedicated vs. Shared Server:
Dedicated Mode:
Each user session is assigned its own server process.
Suitable for small workloads or transaction-heavy OLTP
(Online Transaction Processing) systems.
Shared Mode:
Scales for large user bases.
Reduces resource usage by pooling server processes.
Connection Process Flow:
Client → Listener → Server Process → Execution and Response.
Database Startup Phases
Nomount Phase:
• Instance starts; memory structures are allocated but the database itself is
not yet open.
• Parameter files (spfile or pfile) are read.

Mount Phase:
Control files are read and database recovery begins if needed. The database
is mounted, but data files are not yet fully opened.

Open Phase:
Verifies data files and redo logs.
Database is ready for transactions.

System Views:
V$INSTANCE → It provides information if instance is starting, running, or
shutting down.
V$DATABASE → View mounted/open status of database.
Startup Practical Commands
Startup Modes:
Full Startup: Oracle will go through all three phases of the startup
process: Nomount, Mount, and Open.
STARTUP;

Nomount Only: Starts the Oracle instance but does not mount the
database. It skips the Mount and Open phases.
STARTUP NOMOUNT;

Mount Database:
ALTER DATABASE MOUNT;
Database Shutdown Modes
Normal:
Waits for active sessions to disconnect.
Transactional:
Waits for active transactions to complete.
Immediate:
Rolls back active transactions and closes database.
Abort:
Forced shutdown without cleanup; requires recovery on
next startup.
Shutdown Practical Commands
Normal Shutdown:
SHUTDOWN NORMAL;

Transactional Shutdown:
SHUTDOWN TRANSACTIONAL;

Immediate Shutdown:
SHUTDOWN IMMEDIATE;

Abort:
SHUTDOWN ABORT;
Troubleshooting Startup and Shutdown
Common Startup Issues:
Missing/corrupted parameter files → Restore from backup.
Control file corruption → Use a valid backup copy.

Shutdown Problems:
Hanging sessions → Use IMMEDIATE mode.

Troubleshooting Logs:
The alert log provides detailed error messages and
timestamps that can help identify the cause of the failure.
Real-World Examples
Scenario 1:
RMAN backup fails due to insufficient Large Pool memory.
Solution: Increase large_pool_size.

Scenario 2:
Database stuck during shutdown.
Solution: Use SHUTDOWN ABORT followed by recovery
during startup.

Scenario 3:
Log Writer bottleneck impacting performance.
Solution: Use faster storage for redo logs.
Monitoring and Best Practices:-
Memory Usage:
SELECT * FROM V$SGAINFO;
This query provides important information about the System Global
Area (SGA), which is the memory structure that holds data shared
by all server processes in Oracle.
Process Monitoring:
SELECT * FROM V$PROCESS WHERE TERMINAL IS NOT NULL;

Best Practices:
• Schedule regular RMAN backups and test restores.
• Use appropriate shutdown modes for maintenance.
• Monitor process and memory performance proactively.
Summary and Recap
Core Concepts:
Large Pool supports parallel queries, RMAN, and shared
server.
Background and server processes ensure seamless operations.
Proper startup and shutdown modes maintain database
integrity.

Key Commands:
STARTUP, ALTER DATABASE MOUNT, SHUTDOWN
IMMEDIATE.

You might also like