But in a recent research of mine, I've come across really interesting facts about listeners, which of course I'll share with you over here.
Listener lies at the top of the Oracle net foundation layer. When an instance is initiated, listener establishes communication pathway to oracle. It also establishes communication pathway between databases, in case, when multiple database or instances runs on one single computer.
Listener identifies the database instance through service names. It communicates with the database using listening endpoints which are port numbers, and can be dynamically registered with listeners. Following is the way how communication is established between client and database:
Client Request reaches listener--> listener selects appropriate handler--> Listener determines that service is available --> Directs the client request to the service --> If a listener receives an incoming request before the respective instance has been registered, the listener rejects the request --> receives the service answer -->Provides connection between client and the database.
During service registration, an instance background process provides listener the following information.
- Names of the database services provided by the database
- Name of the instance associated with the services and its current and maximum load
- Service handlers available for instance, including their type, protocol addresses.
So next time when you're connected to an oracle database using any application, just remember the role listener is playing as a broker between application and database.
Have a great life….