Establishing a Connection and Session in Oracle
In this article, I am going to discuss Establishing a Connection and Session in Oracle. This is a chapter. In this chapter, we will be learning about configuring the Oracle Network Environment. This is related to the listener, and the local listener. We will be understanding more in-depth about the Network environment.
Establishment of a Connection and Session in Oracle:
We have a client machine. This client is trying to access a service named pdb1.example.com. We have a database server that contains a listener, instance, and database. The database is a container database that has a pluggable database called PDB1. The service of the pluggable database is pdb1.example.com. Example.com is the domain name.
Steps for Establishing a Connection in Oracle:
- The listener receives the connection packet. The client machine will send the connect packet which contains the host, protocol, and database service. The Oracle listener will receive the package.
- If the service name is valid the listener creates a dedicated server process. If the service name is not valid then the listener will not create the server process.
- The listener connects to the server process and passes the initialization info to it. The initialization info contains the username and password of the client.
- The Server process will check the authentication of the user. If the authentication is ok then the server process will create a session.
- The Server process will be acting like an agent. The Server process will be responsible for any operation related to the database.
The server process is responsible for:
- Parsing and running any SQL statements issued through the application.
- Checking the database buffer cache for data blocks required to perform SQL statements.
- Reading necessary data blocks from data files on the disk into the database buffer cache portion of the System Global Area (SGA), if the blocks are not already present in the SGA.
- Managing all sorting activity, The Sort Area is a memory area that is used to work with sorting, it is contained in a portion of memory that is associated with the Program Global Area (PGA).
- Returning results to the user process in such a way that the application can process the information.
- Reading auditing options and reporting user processes to the audit destination.
Further, we will be learning about the default listener. We will be learning more about listeners and the listener configuration.
In the next article, I am going to discuss Default Listener in Oracle with Examples. Here, in this article, I try to explain Establishing a Connection and Session in Oracle with Examples and I hope you enjoy this Establishing a Connection and Session in Oracle article.
About the Author: Pranaya Rout
Pranaya Rout has published more than 3,000 articles in his 11-year career. Pranaya Rout has very good experience with Microsoft Technologies, Including C#, VB, ASP.NET MVC, ASP.NET Web API, EF, EF Core, ADO.NET, LINQ, SQL Server, MYSQL, Oracle, ASP.NET Core, Cloud Computing, Microservices, Design Patterns and still learning new technologies.