Published by : Obay Salah , November 18, 2024

 It is the second part of the Oracle database components:

Oracle Database Server = Oracle Instance + Oracle Database

This section contains a set of files:

1- Control files:-

It is the file responsible for synchronization in the database, in addition to containing basic information about the database, such as the name of the database and other than it, the database does not work, as it contains the paths of the database files, and if you add a file to the database, the Control file is updated automatically.

2- Redo log files :-

This file is used to recover the database in case of a problem, as it saves the changes that occur in the database.

3- Database files:-

It is the real store of data in the database, i.e. it contains tables, views, indexes, tables, and other objects.

4- Archived redo log files:-

It is a copy of the Redo log files and we also need it when performing a database recovery.

5-Other files:-


  •  Parameter file:

It is used to initialize the Oracle instance at the moment of its operation, and contains all the variables specific to initializing the database.

  • Password file:

This file allows users to connect to the database remotely as database administrators.


Tablespace and Data File: -

Here it must be noted that the database can be divided into Logical & Physical.


Physical: This type can be dealt with whether the database is open or closed, so that it can be dealt with through the operating system or through the database.


Logical: We cannot deal with this type unless the database is open


Tablespace and Data File:-




The database is physically divided into storage files that can be viewed by the operating system, which are the Data files. The database is also divided into logical storage units, and these units are called Tablespace.



The figure shows the logical division of the database, where the database is divided into a set of logical units. The Tablespace is a logical unit that contains one or more Data files, and each Data file actually belongs to only one Tablespace. Tablespaces Bigfile can be created so that it contains one Data file, but it is very large so that It is larger than GB4. The Tablespace consists of a group of smaller logical units called Segments, which are logical units that make up the Tablespace, so that the Segment belongs to only one Tablespace, which consists of a group of smaller logical units called Extents, which are also logical units.

Each Extent belongs to only one Segment and Extents are also made up of another smaller group.

It is the smallest logical unit called Blocks. When creating a database, the size of the block is determined for the database. The size of the block can be 4 KB or 8 KB or other, and the largest size of the block depends on the operating system. Before the Oracle 9i release, the database worked on one block size, and starting from the Oracle 9i release, the database was able to work on In different sizes of blocks.



Let's assume that the shape represents a Tablespace called Users. This Tablespace contains two files


from the Data File (D1 & D2). This Tablespace contains a set of Segments


)3&T 2&T 1(T The first Segment 1T is divided into a set of Extents

Each Extent is of course composed of a set of Blocks. We notice here that Segment T1 extends over both files (D1 & D2), meaning that part of the Segment is in the D1 file and the other part is in the 2D file, but at the same time it belongs to one Tablespace.


Follow this scenario as it explains the steps of creating a database:



1-The instance is running on the server.


2-At this stage the user tries to connect to the database via the application or one of the database tools.


3- At this moment the user's request has been verified, the connection has been established and the Process.Server has been configured.



4- Here the user requested to modify a row.


5- The Process Server receives this request and tests the Pool Shared. Is this request


existing in the SQL Shared Area? If it exists, it verifies that the user has the authority to


access this data. If this request does not exist, it creates a new SQL Shared Area.

6- At this stage, the Process Server retrieves the required data from the file Data from the table or from the Block Data stored in the SGA.


7- After fetching the data here, the server modifies the table in the SGA


8- At the moment of Commit, the LGWR writes the operation in the File Log. Redo


9- The DBWn writes the modifications to the Disk or what is called the File. Data


10- Finally, the Process Server sends a message about the success or failure of the operation.


 The Oracle Data Dictionary:

The database contains thousands of objects; All information about these objects is kept in what is called Dictionary Data, which is tables called Tables Base, and these tables are owned by the user SYS, which is created during the creation of the database. These tables are not accessed directly, but their names are encrypted so that users cannot modify or delete them. To make the matter easier, It is easier to access the Dictionary Data and obtain information about the objects in the database. There are Views interfaces. These interfaces are created during the creation of the database, and there are three levels of these interfaces:

USER_Views: This interface allows the user to get all the information about the objects he owns.


ALL_Views: This interface allows the user to get all the information about the objects he owns and has access to.


DBA_Views: It is used by the database administrator to get information about all the objects in the database.


Database Administrator Duties:


1- Verify the database requirements: The database administrator evaluates the server and ensures that it meets all the requirements of memory, hard disk, and other resources needed by the Oracle database.

 2- Installing Oracle: After ensuring that the installation requirements are met, one of the most important tasks of the database administrator is to install Oracle and configure it to meet the requirements.

 3- Planning the database: After installing Oracle and before creating the database, the database administrator must plan the database, specifying its physical and logical structure, and in other words,

Proper planning so that the database administrator provides an answer to each question in order to ideally.

4- Creating a database: This is one of the most important tasks of a database administrator. We will talk about this in some detail.


5- Protecting the database: This is done by developing a strict backup strategy and other preventive measures so that the database is not lost in various circumstances.


6- Creating and managing database users: granting them appropriate powers, monitoring their operations, and ensuring that they are not granted excessive powers (we will discuss this topic in some detail).

7- Recovering the database in case of a problem: Sometimes problems occur in the database that cause it to be damaged or lost, so the database administrator must be able to restore the database to the state before the problem occurred. 

8- Monitoring database performance: The work of the database administrator does not stop at creating the database, setting the backup strategy, and managing users, but also following up on the progress of the database and providing ideal performance.

Tags : Database

You May Also Like

Comments

no comment yet!