Operating System - HP-UX
1751975 Members
4742 Online
108784 Solutions
New Discussion юеВ

Re: Oracle listener and process

 
SOLVED
Go to solution
Shivkumar
Super Advisor

Oracle listener and process

What is the difference between oracle listener and oracle database process ? If we want to find the status of database; should we be interested in database or listener process ?

Thanks,
Shiv
13 REPLIES 13
Steven E. Protter
Exalted Contributor
Solution

Re: Oracle listener and process

The listener "listens" for incoming connections to the database. No listener, nobody can use the data.

The other database processes do other job. smon, monitors, logwr writes logs and such.

ps -ef | grep oracle

You will see a list that accomplishes various tasks within the database system.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rita C Workman
Honored Contributor

Re: Oracle listener and process

Stephen has answer the one. Let me add another.....if a listener gets out of sync with the database, like when you have a network disruption or reset, it is like a heart beat having a problem arythmia.

So both the database must be up, and the listener listening properly for everything to work right.

Rgrds,
Rita
Devender Khatana
Honored Contributor

Re: Oracle listener and process

Hi,

A database running and lintener not running would be the scenario like a machine having a Ethernet card without a IP address.

So everything is there but you can not access it. So listener should always be running when you wish to connect to database.

HTH,
Devender
Impossible itself mentions "I m possible"
Shivkumar
Super Advisor

Re: Oracle listener and process

What is the command to find the listener process ?

Thanks,
Shiv
James R. Ferguson
Acclaimed Contributor

Re: Oracle listener and process

Hi Shiv:

Try:

# ps -ef|grep -i listen

...you will see something like:

oracle 2216 1 0 Apr 23 ? 92:33 /ora_apps/app/oracle/product/8.1
.7.0/bin/tnslsnr LISTENER -i

Regards!

...JRF...
Devender Khatana
Honored Contributor

Re: Oracle listener and process

Hi,

From oracle user you can also give to find out the status of listener.

#lsntctl status

HTH,
Devender
Impossible itself mentions "I m possible"
Indira Aramandla
Honored Contributor

Re: Oracle listener and process

Hi Shiv,

Listener process
The listener process is a process listening for incomming connections on behalf of 1 or more databases.
The following are listener Characteristics:
- a listener process can listen on behalf of more than one database
- multiple listeners can listen on behalf of one single database (load balancing)
- can listen on multiple protocols
- default name is LISTENER
- the name must be unique on the machine it resides on

The listener process is responsible for detecting and routing the incoming requests to the proper destination. Except when connection is established through a special method called hostnaming.

A user initiates a connect request by passing password/username and servicename The service name maps to a connect descriptor wich is resolved by hostnaming, local naming or oracle names. (sqlnet.ora tnsnames.ora names.ora). When a service name is resolved a request is send to the listener. The listener determines were to direct the request.

Oracle processes
There are different oracle program types. The first program type you should be aware of are the Oracle user or client processes. These processes are created when you start a program which will work with an Oracle database. The second program type you should be aware of are the Oracle shadow or server processes. Shadow processes work directly with the database instance to carry out the requests from the user processes. The third program type you should be aware of are the Oracle background processes.

Oracle background processes. These processes are created when you start a database instance. Common examples of Oracle background processes are log writer (lgwr), database writer (dbw0), system monitor (smon), process monitor (pmon), recovery (reco), and check point (ckpt), but may include others. These processes run with the name ora_ProcessName_SID, where ProcessName is the name of the background process and SID is the value of ORACLE_SID.

These are the processes which manage the Oracle RDBMS. Some must always be running for the server to be available; others are optional on all platforms; and some are optional and specific to certain platforms.

To verify a database is up and runing loomfor the following process.
A = Must always be running
O = Optional on all platforms
P = Optional and specific to a platform


DBWR (A) - the database writer
LGWR (A) - the log writer
PMON (A) - the process monitor
SMON (A) - the system monitor
CKPT (O) - the checkpoint process (or thread)
ARCH (O) - the archive process (or thread)
RECO (O) - the recoverer process (or thread)

Attached are two documents that explains the various Oracle Back ground processes and the new Oracle Background processes in 10g.

Indira A


Never give up, Keep Trying
Ganesha Sridhara
Honored Contributor

Re: Oracle listener and process

Hello Shiv,

In oracle the listener "listens" will accept incoming connections to the database which by default runs on port 1521.
The status of listener can be obtained by command:
lsnrctl status (execute as oracle user)

e.g., output
Service "oracle" has 2 instance(s).
Instance "sid1", status UNKNOWN, has 1 handler(s) for this service...
Instance "sid1", status READY, has 1 handler(s) for this service...

For each instance one listener will be running.

The database background processors which manage DB are:
PMON - Process monitor
SMON - system monitor
DBWR - Database writer
LGWR - Log Writer

Optional
ARCH - Archiver
CKPT - Checkpoint
RECO - Recovery
PMON - Process monitor
SMON - system monitor
DBWR - Database writer
LGWR - Log Writer

Optional
ARCH - Archiver
CKPT - Checkpoint
RECO ├в Recovery

The status of DB can be obtained by executed following command as oracle user
ps -ef | grep

Which will list the background processes.

ps - ef | grep sid1
e.g.,
oracle 3136 1 0 Jul 22 ? 14:26 ora_pmon_sid1
oracle 3144 1 0 Jul 22 ? 8:40 ora_smon_sid1
oracle 1582 1552 0 13:07:47 pts/th 0:00 grep sid1
oracle 3140 1 0 Jul 22 ? 5:45 ora_lgwr_sid1
oracle 3138 1 0 Jul 22 ? 5:44 ora_dbw0_sid1
oracle 3142 1 0 Jul 22 ? 18:38 ora_ckpt_sid1
oracle 3146 1 0 Jul 22 ? 0:02 ora_reco_sid1
oracle 3148 1 0 Jul 22 ? 13:09 ora_cjq0_sid1
oracle 3150 1 0 Jul 22 ? 11:19 ora_qmn0_sid1


Regards
Ganesha Sridhara
Yogeeraj_1
Honored Contributor

Re: Oracle listener and process

Dear shiv,

allow me to add the following:

A listener can also be configured with one or more listening protocol addresses, information about supported services, and parameters that control its runtime behavior. The listener configuration is stored in a configuration file named listener.ora.

Because all of the configuration parameters have default values, it is possible to start and use a listener with no configuration. This default listener has a name of LISTENER, supports no services upon startup, and listens on the following TCP/IP protocol address:
(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))

For more information see also:
http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96580/listener.htm#454524

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)