Apr 25, 2015

ORACLE ARCHITECTURE

Normally, one database is serviced by one instance, but in the case of clustering there can be many instances running for a single database.
The System Identifier, or SID, is the name given to the database instance.

There are two major components to the software: the TNS Listener (Transparent Network Substrate ) and the relational database management system (RDBMS) itself.
The TNS Listener is the hub of all Oracle communications.
When a database instance is brought up or started, it registers with the TNS Listener.
When a client wishes to access the database, it first connects to the Listener and the Listener then redirects the client to the database server.When the RDBMS wants to launch an external procedure, it connects first to the Listener, which in turns launches a program called extproc. One exception to this is the external jobs launched by the databases job scheduler. Here the RDBMS connects directly to the external job server.

 The Listener is comprised of two binaries: (1) tnslsnr which is the Listener itself and (2) the Listener Control Utility
(lsnrctl) which is used to administer the Listener on the server or remotely.

 Transparent Network Substrate (TNS) is the network protocol used by Oracle for connectivity to Oracle Databases.

The lsnrctl program is the mechanism for starting and stopping the listener process (tnslsnr). 
tnslnsr starts and reads the listener.ora and sqlnet.ora files for configuration information, such as
port numbers and database service names.

The tnslnsr processes starts with the process owner of the lsnrctl program,


A database instance describes all the processes and memory structures that provide access to the database.
There are two kinds of processes - background and shadow, or server. Shadow or server processes serve client requests. In other words, when a client connects
to the TNS Listener and requests access to database services, the Listener hands them off to a server process. This server process takes SQL queries and
executes them on behalf of the client. Background processes exist to support this. There are a number of different background processes each with a different role,
including the Database Writer, the Log Writer, the Archiver, the System Monitor, and the Process Monitor, among others.

When a local user attempts to connect to Oracle on Windows, it does so over named pipes. Four threads are created in the main server process to handle the
communication between the client and the server. These four threads have a Discretionary Access Control List (DACL) that gives the user permission to open the thread.

In Unix platforms each of these background processes is a separate running process, as in an operating system process. On Windows, theyre all
wrapped up into one larger process - namely, oracle.exe. There is a special area of memory that is mapped among all processes on Unix called the System Global Area
(SGA). The SGA is implemented as a memory-mapped file (section) and contains information pertaining to the instance and the database. It also contains an area known
as the shared pool, which contains structures shared among all users, such as table definitions and the like.

No comments: