Search This Blog

18 October 2012

Heck! My Computer is not LISTENING me

Most of us are aware of database, being specific, Oracle database. The people who are using Smartplant Applications must be aware of listeners. I've worked more than half of my career (which is really very short period of time) on oracle. Being an average student at college and not very interested in DBMS subject, I never bothered about listeners in database. I still don't know that they really teach about it or not.


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.
If the listener is not running when an instance starts, PMON (Process MONitor) is not able to register the service information. PMON attempts to connect to the listener periodically, however, it may take up to 60 seconds before PMON registers with the listener after it has been started. To initiate service registration immediately after the listener is started, use the SQL statement ALTER SYSTEM REGISTER. This is especially useful in high-availability configurations.

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….

No comments:

Post a Comment