Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Tom Kyte

Thanks for the question, Md. Sazzadur Rahman.

Asked: January 12, 2002 - 11:56 pm UTC

Last updated: July 13, 2004 - 2:46 pm UTC

Version: 8.1.6

Viewed 1000+ times

You Asked

Hi Tom,
I have installed Oracle 8i(8.1.6) on Redhat Linux 6.2, but I am facing some problems.
I want to start listener service and oracle SID during linux startup.
I have configured as per linux documentation provided by Oracle.
I have already set environment variable and export the PATH in the profile.

Here I give 2 problems that I am facing:
1)
For listener service I have included the following line in the /etc/services file as per
instruction:
listener 1521/tcp
But Listener does not start automatically during linux booting.
I have to start it manually.
What is the problem? How it will be solved?
2)
I have updated the /etc/oratab file. My Oracle service name is project.
project:ORACLE_HOME:Y

I have created a file named dbora in the location of
/etc/rc.d/init.d/ and added the following lines:

#!/bin/sh
ORA_HOME=/p02/oracle
ORA_OWNER=oracle
if [! -f $ORA_HOME/bin/dbstart]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')

su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
;;
'stop')

su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac

Then I have Linked dbora file by entering:
$ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc0.d/K10dbora
$ ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc2.d/S99dbora

But I am facing the same problem. Database and Listener do not start automatically.
I have to start the Listener by using the command '$lsnrctl start listener'
and database in the server manager 'svrmgr>startup'

I don't want this. I want to start both listener and database automatically.
What is the solution?

With best regards.

Sazzadur Rahman Tusar, Bangladesh.


and Tom said...

that just documents that the listener will be using that port. It doesn't start a thing. Its not supposed to start anything (heck, there isn't even enough information contained in that line to know that the process is lsnrctl that needs to run)

Now, I'm not a linux admin, never used linux -- but I use solaris all of the time. See
</code> http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:387218751430 <code>

for how I do this on solaris. Since you have init.d files -- it looks like it will be exactly the same. Use my method.

Rating

  (10 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

I need a solution

Sazzadur Rahman Tusar, January 13, 2002 - 11:27 pm UTC

I need a solution of Listener problem on Linux.


Tom Kyte
January 14, 2002 - 7:37 am UTC

umm, yes. I showed you how to autostart stuff. did you read it? follow the link and its right there.....

Tianhua Wu, January 14, 2002 - 10:00 am UTC

I have used Linux for quite a while. There is no major different between Solaris and Linux. just add two line in the /path/init.d/Oracle file:

...
su - oracle -c "ORACLE_HOME=/opt/oracle/product/8.0.5; export ORACLE_HOME; /opt/oracle/product/8.0.5/bin/lsnrctl start"
...
su - oracle -c "ORACLE_HOME=/opt/oracle/product/8.0.5; export ORACLE_HOME ; /opt/oracle/product/8.0.5/bin/lsnrctl stop"
...


Hope this help.

Tianhua Wu, January 14, 2002 - 10:04 am UTC

Oh, the su command is slightly different.

I have solved it!

Sazzadur Rahman Tusar, January 15, 2002 - 5:17 am UTC

I have solved this problem by writing script that is
the similar to SUN solaris.This is running well.
Thanks Tom.

Mark, June 13, 2003 - 12:09 pm UTC

Hi Tom,

I have installed Oracle 8.1.7 EE on a standalone intel pc, running Red Hat Linux 8.0.

As an oracle user, I am able to start/stop oracle database, connect using sqlplus and everything is working fine, as expected.

But when I try to connect as a different user, I get TNS error. I have done the necessary environment settings for this user like ORACLE_HOME, ORACLE_SID, PATH etc. I also tried copying the tnsnames.ora into this users home directory. So what else is missing ?

Or is this a totally wrong way to try connecting as a different user (other than oracle) on an Oracle server ???

Thanks in advance !!

Tom Kyte
June 13, 2003 - 12:31 pm UTC

well, no error message, no error code, no nothing. there are more then one tns error messages possible.

on the same machine, you should only have to set

o ORACLE_HOME
o ORACLE_SID

and then $ sqlplus scott/tiger


if you use sqlplus scott/tiger@tns_connect_string, then that would have to be setup in the tnsnames.ora file and the listener would have to be running.

no messages, no codes, no help ;)

I have a couple of problems, myself

A reader, June 13, 2003 - 2:21 pm UTC

Could you get out your crystal ball and fix them, please? Seriously.

queue size

reader, May 10, 2004 - 8:42 pm UTC

Tom, how does queuesize parameter affect the connect rate to the listener process? What does queuesize mean? How do I set an appropriate value for this? Thanks.

Tom Kyte
May 11, 2004 - 8:10 am UTC

</code> http://docs.oracle.com/docs/cd/B10501_01/network.920/a96580/listener.htm#491633 <code>

it is a tcp thing, how many requests can be queued to be processed. if more requests arrive at the same time than can be handled or queued, they fail.

ROT

reader, May 11, 2004 - 1:45 pm UTC

Is there a ROT for how many connections a listener process can accept per second? Thanks.

Tom Kyte
May 11, 2004 - 3:11 pm UTC

"lots"

depends on OS, depends on network, depends on too much stuff.

but "lots"

more than one listener

Shiva, May 11, 2004 - 3:42 pm UTC

What should be the criteria to decide if I need more than one listener to accept connections for the same database? Thanks.

Tom Kyte
May 11, 2004 - 8:45 pm UTC

today, in 2004 with client server finally dead and or dying....

probably never.

connections (only time listener is involved) shouldn't be the issue -- with connection pooling, ntier proxy authentication and the like, you don't establish connections very often at all (relatively speaking).

even if you do lots -- the listener doesn't have a very heavy duty job. one is most generally "enough"

A reader, July 13, 2004 - 2:46 pm UTC