Overview of Primary Components
Oracle server: There are several files, processes, and memory structures in an Oracle server; however, not all of them are used when processing a SQL statement. Some are used to improve the performance of the database, ensure that the database can be recovered in the event of a software or hardware error, or perform other tasks necessary to maintain the database. The Oracle server consists of an Oracle instance and an Oracle database.
Oracle instance: An Oracle instance is the combination of the background processes and memory structures. The instance must be started to access the data in the database. Every time an instance is started, a System Global Area (SGA) is allocated and Oracle background processes are started. Background processes perform functions on behalf of the invoking process. They consolidate functions that would otherwise be handled by
multiple Oracle programs running for each user. The background processes perform input/output (I/O) and monitor other Oracle processes to provide increased parallelism for better performance and reliability.
Oracle database: An Oracle database consists of operating system files, also known as database files, that provide the actual physical storage for database information. The database files are used to ensure that the data is kept consistent and can be recovered in the event of a failure of the instance.
Other key files: Non database files are used to configure the instance, authenticate privileged users, and recover the database in the event of a disk failure.
User and server processes: The user and server processes are the primary processes involved when a SQL statement is executed; however, other processes may help the server complete the processing of the SQL statement.
Other processes: Many other processes exist that are used by other options within Oracle, such as Advanced Queuing, Real Application Clusters, Shared Server, Advanced Replication, and so on. These processes are discussed within their respective courses.
An Oracle server:
• Is a database management system that provides an open, comprehensive, integrated approach to information management
• Consists of an Oracle instance and an Oracle Database
Oracle Server
The Oracle server can run on a number of different computers in one of the following ways:
• Client-Application Server-Server • Client-Server • Host-Based
Client-Application Server-Server: (Three-tier) Users access the database from their personal computers (clients) through an application server, which is used for the application’s processing requirements.
Client-Server: (Two-tier) Users access the database from their personal computer (client) over a network, and the database sits on a separate computer (server).
Host-Based: Users are connected directly to the same computer on which the database resides.Oracle Instance
• Is a means to access an Oracle database
• Always opens one and only one database
• Consists of memory and process structures An Oracle instance consists of the System Global Area (SGA)
Connecting to an Oracle Instance
Before users can submit SQL statements to an Oracle database, they must connect to an instance.
• The user starts a tool such as SQL*Plus or runs an application developed using a tool such as Oracle Forms. This application or tool is executed as a user process.
• In the most basic configuration, when a user logs on to the Oracle server, a process is created on the computer running the Oracle server. This process is called a server process. The server process communicates with the Oracle instance on behalf of the user process that runs on the client. The server process executes SQL statements on behalf of the user.
Connection
A connection is a communication pathway between a user process and an Oracle server. A database user can connect to an Oracle server in one of three ways:
• The user logs on to the operating system running the Oracle instance and starts an application or tool that accesses the database on that system. The communication pathway is established using the interprocess communication mechanisms available on the host operating system.
The user starts the application or tool on a local computer and connects over a network to the computer running the Oracle instance. In this configuration, called client-server, network software is used to communicate between the user and the Oracle server.
• In a three-tiered connection, the user’s computer communicates over the network to an application or a network server, which is connected through a network to the machine running the Oracle instance. For example, the user runs a browser on a computer on a network to use an application residing on an NT server that retrieves data from an Oracle database running on a UNIX host.
Sessions
A session is a specific connection of a user to an Oracle server. The session starts when the user is validated by the Oracle server, and it ends when the user logs out or when there is an abnormal termination. For a given database user, many concurrent sessions are possible if the user logs on from many tools, applications, or terminals at the same time. Except for some specialized database administration tools, starting a database session requires that the Oracle server be available for use.
Note: The type of connection explained here, where there is a one-to-one correspondence between a user and server process, is called a dedicated server connection. When using a shared server configuration, it is possible for multiple user processes to share server processes.An Oracle database:
• Is a collection of data that is treated as a unit
• Consists of three file types
An Oracle Database
The general purpose of a database is to store and retrieve related information. An Oracle database has a logical and a physical structure. The physical structure of the database is the set of operating system files in the database. An Oracle database consists of three file types.
• Data files containing the actual data in the database
• Redo logs containing a record of changes made to the database to enable recovery of the data in case of failures
• Control files containing information necessary to maintain and verify database integrity
Other Key File Structures
The Oracle server also uses other files that are not part of the database:
• The parameter file defines the characteristics of an Oracle instance. For example, it contains parameters that size some of the memory structures in the SGA.
• The password file authenticates users privileged to start up and shut down an Oracle instance.
• Archived redo log files are offline copies of the redo log files that may be necessary to recover from media failures.
Physical Structure
The physical structure of an Oracle database is determined by the operating system files that provide the actual physical storage for database information.
• Control files
• Data files
• Redo log files
Physical Structure
Other key files exist and are required to start up and use a database, for example: parameter files, configuration files, password files and so on. However, the physical structure of an Oracle database includes only three types of files: control files, data files, and redo log files.
Memory Structure
Oracle’s memory structure consists of two memory areas known as:
• System Global Area (SGA): Allocated at instance startup, and is a fundamental component of an Oracle Instance
• Program Global Area (PGA): Allocated when the server process is startedSystem Global Area (SGA)
• The SGA consists of several memory structures:
– Shared pool
– Database buffer cache
– Redo log buffer
– Other structures (e.g. lock and latch management, statistical data)
• There are two optional memory structures that can be configured within the SGA:
– Large pool
– Java pool
System Global Area
The SGA is also called the shared global area. It is used to store database information that is shared by database processes. It contains data and control information for the Oracle server and is allocated in the virtual memory of the computer where Oracle resides. The following statement can be used to view SGA memory allocations:
SHOW SGA;
Total System Global Area 36437964 bytes
Fixed Size 6543794 bytes
Variable Size 19521536 bytes
Database Buffers 16777216 bytes
Redo Buffers 73728 bytes
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment