SERVER/USER PROCESS! Flashcards
USER PROCESS
Is used when a USER runs an application(SQLPLUS) program.
Runs the tool/application considered the CLIENT
Passes SQL to the SERVER PROCESS and receives results.
SERVER PROCESS
- Converts SQL statement into BINARY format ( machine Language)./Parse.
- It is either DEDICATED or SHARED by USER PROCESS.
- Places and must place Data in the Database BUFFER cache.
- Parses and Executes SQL statements.
- Reads Data Blocks from Disk into the SHARED Database BUFFERS of the SGA.
- Returns results to USER PROCESS.
RULE of THUMB #1
Enable SHARED SERVERS when CONCURRENT USER connections would be greater than 50.
NB:
No PGA with shared SERVERS.
PGA is only with DEDICATED servers.
RULE of THUMB #2
When creating a Database, set the SGA to not more than 40% of the SERVER’S MEMORY so as to have room for growth/ future growth of the SGA, PGA, O/S and other processes.
BACKGROUND PROCESSES (DBWr)
- Writes CONTENTS (dirty buffers) to Data_Files.
- Primary Job is to keep the Oracle Database buffer CLEAN.
- Writes Least Recently Used (LRU) DIRTY buffers to DISK first.
- Writes to Data_Files in optimal batch.
- Only process that writes directly to Data_Files.
- Mandatory Process.
NB:
***DBWn (n=0-9) Writes to Data_Files when:
a. A Server Process CANNOT find a CLEAN reusable buffer. i.e There are NO FREE buffers/FREE buffers NOT available.
A USER’S SERVER process has searched too long for a FREE buffer when reading a buffer cache.
b. At same Checkpoint.
c. When dirty buffers reach a certain THRESHOLD.
CTr (Change Track Writer)
Records info about blocks that have CHANGED since RMAN backup.
RvWr (Recovery Writer)
Writes MODIFIED blocks to FLASHBACK logs.
LGWr (Log Writer Process)
Writes Redo log buffer to the Redo log file on Disk.
Writes when:
a. A User COMMITS a transaction.
b. Redo log buffer is ONE THIRD full.
COMMIT command - Allows USERS to save transactions that have been made against a Database.
SMON
- Performs Automatic Instance Recovery.
- Reclaims Space used by temporary Segments no longer in use i.e De-allocated.
- COALESCES - i.e Put together free spaces for use.
- Resolves Segment Fragmentation.
- Primarily CLEANS UP SERVE side.
- Mandatory Process.[ps -ef | grep smon]
If you don see smon after grep, then it means NO Data on the machine.
PMON
- Performs automatic process recovery.
Cleans up abnormally terminated connections.
Rolls back non committed transactions.
Releases resources held by abnormally terminated transactions.
- RESTARTS failed Shared Server and Dispatcher Process.
- Wakes up regularly to check whether it is needed or it may be called directly.
- Primarily cleans up CLIENT-side failures(USERS).