Oracle Database Instance

Last updated on May 31 2022
Sankalp Joshi

Table of Contents

Oracle Database Instance

A Database Instance is an interface between client applications (users) and therefore the database. An Oracle instance consists of three main parts: System Global Area (SGA), Program Global Area (PGA), and background processes.

The SGA may be a shared memory structure allocated when the instance started up and released when it’s shut down . The SGA may be a group of shared memory structures that contain data and control information for one database instance.

Different from the SGA, which is out there to all or any processes, PGA may be a private memory area allocated to every session when the session started and released when the session ends.

Major Oracle Database’s background processes

The following are the main background processes of an Oracle instance:

  • PMON is that the process monitor that regulates all other processes. PMON cleans up abnormally connected database connections and automatically registers a database instance with the listener process. PMON may be a process that has got to be alive in an Oracle database.
  • SMON is that the system monitor process that performs system-level clean-up operation. it’s two primary responsibilities including automatically instance recovery within the event of a failed instance, e.g., power outage and cleaning from temporary files.
  • DBWn is that the database writer. Oracle performs every operation in memory rather than the disk because processing in memory is quicker and more efficient than on disk. The DBWn process reads data from disk and writes it back to the disk. An Oracle instance has many database writers DBW0, DBW1, DBW2, and so on.
  • CKPT is that the checkpoint process. In Oracle, data that’s on disk is named block and therefore the data which in memory is named buffer. When a block is written to the buffer and altered , the buffer becomes dirty, and it must be written right down to the disk. The CKPT process updates the control and file headers with checkpoint information and signals writing of dirty buffers to disk. Note that Oracle 12c allows both full and incremental checkpoints.

 

  • LGWR is that the log writer process which is that the key to the recoverability architecture. Every change occurs within the database is written bent a file called redo log for recovery purposes. And these changes are written and logged by LGWR process. The LGWR process first writes the changes to memory then disk as redo logs which then are often used for recovery.
  • ARCn is that the archiver process that copies the content of redo logs to archive redo log files. The archiver process can have multiple processes like ARC0, ARC1, and ARC3, which permit the archiver to write down to varied destinations like D: drive, E drive or other storage.
  • MMON is that the manageability monitor process that gathers performance metrics.
  • MMAN is that the memory manager that automatically manages memory in an Oracle database.
  • LREG is that the listener registration process that registers information on the database instance and dispatcher processes with the Oracle Net Listener.

Now, you ought to have an honest overview of the Oracle Database architecture and its components

Introduction to the Oracle Listener

The listener may be a separate database server process that runs locally on the database server or remotely on the Oracle RAC environment.

This picture shows the Oracle Database architecture and where the listener locates:

 

When a client request comes, the listener first receives it. then it establishes a connection between the client and therefore the database instance.

Once the client is connected to the database instance successfully, it hands over the client connection to the server process.

If the listener stops running, you can’t hook up with the Oracle Database anymore. However, all the prevailing connections won’t be affected.

Oracle Listener control commands

To launch the listener control, you employ the LSNCTRL command from the instruction on Windows or terminal on Linux:

lsnrctrl

Type the assistance command to ascertain all available options:

 

LSNRCTL> help

Here is that the output:

The following operations are available

An asterisk (*) denotes a modifier or extended command:

 

start stop status services

version reload save_config trace

quit exit set* show*

You can use all of those commands to regulate the listener. Let’s use the status command:

 

 

 

 

 

 

 

LSNRCTL> status

The output shows the status of the listener like alias, version, start date, uptime, trace file, security, listener parameter files listener log files and listening endpoint summary.

Now, issue the stop command:

LSNRCTL> stop

Once the listener stop listening, you can’t hook up with the Oracle Database anymore. Any plan to hook up with the Oracle Database will end in the subsequent error:

ORA-12541: TNS:no listener

Note that each one connections established before the listener stopped are going to be unaffected. Because stopping the listener prevents the incoming connections, it doesn’t disconnect people who are already connected.

Use the beginning command to mention the listener:

LSNRCTL> start

To exit the listener, you employ the exit command:

LSNRCTL> exit

Another way to execute the listener command is thru the instruction without going into the listener control interface. for instance , to look at the status of the listener, you’ll use the subsequent command within the instruction on Windows or Terminal on Linux:

lsnrctl status

On Windows, the Oracle listener features a service running as TNS listener. you’ll also control the status of the listener via this service by stopping and starting it.

So, this brings us to the end of blog. This Tecklearn ‘Oracle Database Instance’ blog helps you with commonly asked questions if you are looking out for a job in Oracle DB. If you wish to learn Oracle DB and build a career in Database domain, then check out our interactive, Oracle 12c DBA Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/oracle-12c-dba-course/

Oracle 12c DBA Course Training

About the Course

Oracle Database Administration training will help you master the Oracle DBA. As part of the training, you will master the Oracle Database architecture, the database processes, memory structures, schema objects, security, data recovery and backup through hands-on projects and case studies. Oracle DBA Training helps students gain the skills and knowledge required to install, configure, and administer Oracle databases. Besides, this training also develops the full skill set required to become a successful Oracle Database Administrator.

Why Should you take Oracle DBA Training?

  • The Average salary of an Oracle DBA is $108,837 per annum – GlassDoor.com
  • According to Gartner, Oracle is the market leader in the Relational Database with 48.35% market share globally.
  • IBM, TCS, Tech Mahindra, Oracle, Wipro & other MNCs worldwide use Pl-SQL for their database deployments.

What you will Learn in this Course?

Introduction to Oracle Database

  • What is the Oracle Database
  • Pre-requisites for oracle database
  • Oracle database 12c installation
  • Multi-tenant architecture

Exploring the Oracle 12c Database Architecture

  • Explain the Memory Structures
  • Describe the Process Structures
  • Overview of Storage Structures

Preparing the Database Environment

  • Identify the tools for Administering an Oracle Database
  • Plan an Oracle Database Installation
  • Install the Oracle Software by using Oracle Universal Installer (OUI)
  • Create a Database by using the Database Configuration Assistant (DBCA)

Managing the Oracle Instance

  • Setting database initialization parameters
  • Describe the stages of database startup and shutdown

Database Storage Structures and Schema Objects

  • Managing Database Storage Structures
  • Overview of table space and data files
  • Overview of Primary Components
  • Identify the importance of checkpoints, redo log files, and archived log files
  • Configure ARHIVELOG mode

Database Startup & User Requests and Oracle Network Environment

  • Describe the stages of database startup and shutdown
  • Using alert log and trace files
  • Configure and Manage the Oracle Network
  • pFile and spFile
  • Tablespace Management
  • Storage and Relationship Structure

Oracle Backup & Recovery

  • Redo log File Management
  • Performing Database Recovery
  • Overview of Data Recovery Advisor
  • Use Data Recovery Advisor to Perform recovery (Control file, Redo log file and Data file)

Deep Dive into Oracle Recovery Manager (RMAN)

  • Using the RMAN Recovery Catalog
  • Identify situations that require RMAN recovery catalog
  • Create and configure a recovery catalog
  • Synchronize the recovery catalog
  • Create and Use RMAN stored scripts
  • Back up the recovery catalog
  • Create and use a virtual private catalog

Configuring Backup Specifications

  • Using RMAN to Create Backups
  • Create image file backups
  • Create a whole database backup
  • Enable fast incremental backup
  • Using RMAN to Perform Recovery
  • Perform complete recovery from a critical or noncritical data file loss using RMAN
  • Perform incomplete recovery using RMAN

Data Movement and Oracle Data Pump

  • Moving Data
  • Describe and use methods to use move data (Directory objects, SQL* Loader, External tables)
  • Explain the general architecture of Oracle Data Pump

Data Dictionary & Dynamic Performance Tables

  • Oracle Data Dictionary contains information related to database privileges
  • Data dictionary views
  • Media failure
  • Flashback CDB

Database Tuning

  • What is database tuning
  • How to tune the database
  • Tuning the data dictionary

 

 

0 responses on "Oracle Database Instance"

Leave a Message

Your email address will not be published. Required fields are marked *