0% found this document useful (0 votes)
32 views5 pages

Physical Vs

The document discusses the different types of files that make up an Oracle database including data files, control files, redo log files, parameter files, and others. It provides details on what each file type contains and its purpose in the database architecture.

Uploaded by

Mahdi Aloui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views5 pages

Physical Vs

The document discusses the different types of files that make up an Oracle database including data files, control files, redo log files, parameter files, and others. It provides details on what each file type contains and its purpose in the database architecture.

Uploaded by

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

Physical vs.

logical storage
Oracle database architecture depends upon two types of storage: physical and logical.
Physical (disk) storage contains all the files in the database. Logical storage structures, such
as tablespaces, segments, extents, and blocks, appear on the disk but are not part of the
dataset. Logical storage helps users locate specific data and improves the efficiency of the
retrieval process, enabling a modular data storage system in which capacity can be adjusted
without affecting performance.

A book serves as a helpful analogy for the difference between physical and logical storage. A
book's contents are printed on paper (physical storage), but additional information in the form
of chapters, page numbers, and footnotes (logical storage) helps readers navigate the book
and its contents.

Logical storage is the contextual information that appears in the book, but isn't part of the
book's story. Rather, it's a guide to help you find specific information or mark your place

Database vs. instance


The term "database" is often used to refer to the database and instance as a whole. It's more
precise to use the term "database" when referring specifically to the physical disk or file
storage that contains the data and metadata. In contrast, an "instance" is the processes and
memory set aside to access the information within the database.

Databases exist on disk, while instances reside in memory and run as processes. Memory
structures store data and metadata. Processes help run the database, enable communication
between various components, and keep the data between memory and disk in sync.

Processes
While memory structures contain information, processes control what happens within the
data server. Put another way, processes determine the series of steps that are applied to the
data. Oracle Database processes can be organized into four primary categories:

 Client processes — allow client applications to connect to the server and run its code.

 Server processes — bridge the client and the database. In dedicated server mode, a
server caters only to one client. In shared server mode, a server can cater to multiple
clients simultaneously.

 Background processes — handle administration activities such as I/O. Examples


include process monitor (PMON), system monitor (SMON), and log writer (LGWR).

 Slave processes — assist the other processes to achieve their objectives.

Memory structures
Oracle Database stores in memory information that includes program code, sessions, locking
details, and program execution requirements, along with data. Oracle organizes this
information into four distinct areas:

 System global area (SGA): Every Oracle database instance has one SGA. The data
inside SGA is shared across multiple processes and sessions. Examples of data stored
here include cached data and shared SQL.

 Program global area (PGA): PGA contains data and control information, exclusive
to each process. A process such as database log writer has details specific to its logs in
its PGA.

 User global area (UGA): UGA is memory allocated exclusively for a session. As a
user session ends, its UGA is deleted. When you connect to a database instance and
execute SQL commands and transactions, these happen inside your UGA. In
dedicated server mode, UGA is stored inside PGA, whereas in a shared server mode,
UGA is stored inside SGA.

 Code areas: These are memory areas used to store and run code.

Oracle Database Files


A Database is a collection of database files that organize data and are stored in the disk storage
(Physical). Physical indicates the files that we can see in our daily tasks. We have 9 types of files
in the Oracle Database. They are as follows:
1. Datafiles
2. Control files
3. Redo log files
4. Database Backup files
5. Archived Redo log files
6. Parameter files
7. Password files
8. Alert log files
9. Trace files
Data Files:
Data Files contain the actual user data, application data, and metadata. i.e Tables, Rows,
indexes procedures, views, etc. The combination of datafiles is represented as tablespaces. The
data is stored using Database writer.

Note: If you lose Datafiles, you lose your database. The extension for datafiles is .dbf

Control Files:
Control files stores metadata about the data files and online redo log files like names, locations,
timestamp, and status. This information is required by the database instance to start and open
the database.

Note: If you lose Control Files, you lose your database. The extension for Control files is .ctl

Redo Log Files:


Redo Log Files stores changes to the database as they occur and are used for data recovery.
The redo log files store the changes made to the database like DML and DCL operations. Log
writer is used to writing the changes to redo log files.

Note: If you lose Redo log files, you lose your database. The extension for the redo log file is .log
Database Backups Files:
Any backups of your database that you have taken to be stored in any location to recover the
database when the database is crashed.

Note: The backup must include the data files, control files, and redo log files to recover because
these are the important database files.

Archived Redo Log Files:


This is explained as a group of redo log files. All the redo log files are archived and stored in
some other location for backup and recovery purposes. Contains ongoing history of the data
changes. Using the backup file and archived redo log files you can recover your Oracle database

Parameter file:
There are two parameter files.
1. Pfile
2. Spfile
This file defines how the database instance is configured when it starts up. All the configurations
of the database are present in the parameter file.

Example: SGA size SGA_TARGET, SGA_MAX_SIZE.

Note: The spfile is a binary file, you cannot edit it directly, it should be done by using oracle
commands. Pfile is a parameter file. You can edit again. If you lose the spfile no issue, you can
recreate it again. But it is better to take a backup of the spfile in order to restore all the
configurations of the database.

Password File:
It stores passwords for users with administrative privileges (sys user) in order to connect
remotely. Sys user has all the privileges to the database.

Note: DBA password cannot be stored in the database, because Oracle cannot access the
database before the instance is started, Therefore, the authentication of the DBA must happen
outside of the database. The password file will be present in the below location:
$ORACLE_HOME \database\ PWD sid. ora(sid is database name)

Alert Log File:


The alert log file is a chronological log of messages and errors written out by an Oracle Database
in sequential order. So, this is your go-to file in case you’re trying to troubleshoot a problem with
your database. This log file has all the records what are all the changes to files and other errors
also. For example, you can see when the database was started and stopped.
Location of Alert log file: /oracle/diag/rdbms/dotnet_db1/dotnet_db1/trace/ the file name
would be alert_dotnet_db1.

Trace File:
Each server and background process writes to a trace file. When a process detects an internal
error, it writes information about the error to its trace file.
Location of Trace file: /oracle/diag/rdbms/dotnet_db1/dotnet_db1/trace/ and the file name
would be *.trc
In the next article, I am going to discuss Oracle Database Storage Structures in detail. Here, in
this article, I try to explain Oracle Database Files and I hope you enjoy this Oracle Database
Files article.

You might also like