Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting Oracle LISTENER.

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
Hi folks,

I'm trying to start the Oracle LISTENER daemon using the following code in /etc/rc2.d startup:

su - $ORA_OWNER -c $ORA_HOME/bin/lsnrctl start
retval=$?
if [ ${retval} = 0 ]
then
echo " "
echo "SQL*Net Listener started .... status : '${retval}'"
echo " "
else
echo " "
echo "SQL*Net Listener startup failed .... status : '${retval}'"
echo " "
fi

The problem is the oracle LISTENER will not exit when called, I have to type start then exit. How do I pass these commands to the listener daemon to automate the startup process in the script. Better yet, can someone please provide me with a sample script that I can use to start the database and the listner in /etc/rc2.d. Thanks Stickybit.

P.S new to Oracle.

 
Do you have to do an 'exit' when you run from the command line.

I use 'su - oracle -c /u05/app/oracle/product/8.0.5/bin/lsnrctl start ' on our AIX boxes and it works fine.

What OS are you using ?

Alex
 
Hai,
From the code I am able to understand that the OS is Unix.
So we can try with Here documents of Unix for passing the command line arguemnents to the program that is invoked.
For eg :
$connect scott@orcl/tiger <<Here
select empno from emp;
Here

The above script will connect to oracle, then execute the script and then disconnect.
Thanks,
Double H
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top