oracle v session v process

Oracle vs. Session vs. Process: What's the Difference?

By Ashley Moore
AD

In the vast landscape of database systems, Oracle is a prominent name that often sets the stage for discussions about server processes, user sessions, and instance processes. These terms are fundamental to understanding how Oracle databases operate. Let's delve into Oracle's processing components, starting with the Oracle instance, sessions, and processes.

A running Oracle instance consists of a set of shared memory structures and background processes. These processes work together to manage database operations and ensure data integrity. But what are these processes, and how do they interact with user sessions?

Understanding Oracle Processes

Oracle databases use processes to perform various tasks. These processes can be categorized as background processes or user processes, also known as sessions.

AD
Oracle Reveals UX Enhancements to Boost Supply Chain Efficiency
Oracle Reveals UX Enhancements to Boost Supply Chain Efficiency
Oracle Apps WIP (Work in Process) Training Videos Published on Udemy with Live Meeting Support
Oracle Apps WIP (Work in Process) Training Videos Published on Udemy with Live Meeting Support
Empower Your Workforce with Oracle Cloud HCM Implementation Services
Empower Your Workforce with Oracle Cloud HCM Implementation Services

Background processes in Oracle are normally started automatically by the database when it's first opened. They run continuously until the database is shut down. These processes include tasks such as writing dirty buffers to disk, managing checkpoints, and handling database writers.

Background Processes

The Database Writer (DBWn) is one of the key background processes. It's responsible for writing dirty buffers (data that needs to be flushed to disk) from the buffer cache to disk. This ensures data is always up-to-date and won't be lost in case of a system crash.

oracle
oracle
Oracle Cloud Migration Tool: Quick Migration (QuMiC) - Wipro
Oracle Cloud Migration Tool: Quick Migration (QuMiC) - Wipro
Oracle Development Services | Custom Oracle Developer | Chetu
Oracle Development Services | Custom Oracle Developer | Chetu

Another crucial process is the Checkpoint (CKPT) process. It's responsible for pinning dirty buffers, initiating the commit of non-active transactions, and writing dirty buffers to disk. This process ensures that commitments made before the checkpoint are permanent and won't roll back.

Oracle Database Sessions

On the other hand, user processes, or sessions, are those initiated by users or applications to interact with the database. Each session has its own private memory area, is associated with a specific user, and has its own set of database locks.

AD

Each Oracle session runs as an independent thread of control. It can connect to, or disconnect from, the database independently of other sessions. Multiple users can log in at the same time, each with their own session, allowing parallel processing and concurrency in a multi-user environment.

Top Strategies to Boost the Performance of Oracle Agile PLM
Top Strategies to Boost the Performance of Oracle Agile PLM
Oracle Services
Oracle Services
Oracle Falls Short of Third-Quarter Revenue Forecasts Amid Cloud Competition
Oracle Falls Short of Third-Quarter Revenue Forecasts Amid Cloud Competition
Oracle Cuts Thousands of Jobs in 6 AM Email Shock, India Among the Most Affected
Oracle Cuts Thousands of Jobs in 6 AM Email Shock, India Among the Most Affected
How to Save Cost of Running Oracle EBS?
How to Save Cost of Running Oracle EBS?
Oracle Order Management System Training Tutorial
Oracle Order Management System Training Tutorial

Understanding Oracle Sessions in Detail

Sessions in Oracle are further characterized by their mode of operation - read-only or read-write. The session creates a logical connection between a user and the database, enabling the user to run SQL statements, define schema objects, and perform other database-related tasks.

A read-only session can read all the data that is not marked as VIEW WITH CHECK OPTION, cannot modify (write) data, and does not create any private temporary tablespace tables. Conversely, a read-write session can both read and write data.

AD

Read-Only Sessions

Read-only sessions and read-write sessions are subject to different types of initialization parameters and are supported by different processes. For instance, a read-only session does not require an online redo log, whereas a read-write session does.

Oracle Champions AI Workforce Development with New Academy Courses
Oracle Champions AI Workforce Development with New Academy Courses
an info poster showing the differences between oracle and data source services in one place,
an info poster showing the differences between oracle and data source services in one place,
Oracle Apps WIP (Work in Process) Self Paced Course Published on Udemy with Live Meeting Support
Oracle Apps WIP (Work in Process) Self Paced Course Published on Udemy with Live Meeting Support
Top Oracle Interview Questions and Answers
Top Oracle Interview Questions and Answers
Oracle Process Architecture Internals
Oracle Process Architecture Internals
Oracle Unveils AI Agents to Transform Supply Chain Decision-Making
Oracle Unveils AI Agents to Transform Supply Chain Decision-Making
Oracle Unveils Exascale Service: A Game-Changer for Cloud Computing
Oracle Unveils Exascale Service: A Game-Changer for Cloud Computing
Oracle, la strategia “europea” per cloud e AI
Oracle, la strategia “europea” per cloud e AI
an image of a red cloud with laptops connected to it and the words oracle above it
an image of a red cloud with laptops connected to it and the words oracle above it
Oracle Apps R12 Purchasing Self Paced Course Published on Udemy with Live Meeting Support
Oracle Apps R12 Purchasing Self Paced Course Published on Udemy with Live Meeting Support
Mastering E-Business Suite Financials with Koenig Solutions
Mastering E-Business Suite Financials with Koenig Solutions
How Oracle on Azure Optimizes Performance and Cost for Your Enterprise (2024 Update)
How Oracle on Azure Optimizes Performance and Cost for Your Enterprise (2024 Update)
Oracle Peoplesoft Consulting
Oracle Peoplesoft Consulting
Oracle Unveils Fusion Agentic Applications to Transform Enterprise Workflows
Oracle Unveils Fusion Agentic Applications to Transform Enterprise Workflows

In a defaults settings scenario, Oracle Database sends several background jobs per hooked session. These jobs include jobs for refreshing the library cache, the data dictionary cache, and other aggressive jobs for managing the extent allocation of temporary tablespace and baracade extension.

Read-Write Sessions

Oracle Database dedicates a separate background process for each read-write session. The session-associated process communicates with the Database Writer (DBWn) process that writes the dirty blocks to disk, and the Buffer Cache Log process that logs the buffer changes.

AD

The conception of private memory for each session is extremely useful in multi-user environments where users often have different roles and privileges. This compartmentalization prevents users from interfering with each other's operations.

From an operational standpoint, understanding the intricacies of Oracle sessions and processes enables database administrators to optimize operations, swiftly diagnose and fix problems, and maintain the overall health of the database. Looking ahead, keeping a pulse on these fundamental concepts will remain crucial as Oracle continues to innovate and advance its solutions.

AD