Solved

TNS adapter error, No listener

Posted on 2006-11-30
9
1,077 Views
Last Modified: 2012-06-21
Hi gurus, I am using oracle 8.1.7 std edition on RH Linux ES3.0. When I started the d/b I could not connect to oracle because of TNS error. I am trying to connect to oracle from the server (linux box itself) there are no clients connected to the server.
0
Comment
Question by:aspnetdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 18046224
You need to start the listener.   Before we go through the steps:  Has this ever worked?

also post the output from the following OS command:
lsnrctl status
0
 

Author Comment

by:aspnetdev
ID: 18046340
connecting to (add=(protocol=ipc)(key=PanaCIM))
TNS-12541: TNS: no listener
TNS-12560: TNS: protocol adapter error
TNS-00511: No listener
Linux error: 111: connection refused.
0
 

Author Comment

by:aspnetdev
ID: 18046514
Hi

it worked when I manually started the listener,

thx anyway.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 18046899
So basically you're saying that the listener isn't starting up on boot of the box?

I'm not a Linux person and I've been away from UNIX for a few years but there should be symbolic links from the Linux startup scripts directories over to a script in $ORACLE_HOME/bin that should be starting the listener.  These links should have been created for you by the root.sh script.

After you installed Oracle, did you run the root.sh script as the root user?
0
 
LVL 11

Accepted Solution

by:
mohammadzahid earned 200 total points
ID: 18047007
In order for the Oracle server to start automatically at system boot time, create the file /etc/init.d/oracle like this:

#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance

ORA_HOME="/u01/app/oracle/product/9.2.0.1.0"
ORA_OWNR="oracle"

# if the executables do not exist -- display error

if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
        echo "Oracle startup: cannot start"
        exit 1
fi

# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display

case "$1" in
    start)
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
        su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
        touch /var/lock/subsys/oracle
        echo "OK"
        ;;
    stop)
       # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
        su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
        rm -f /var/lock/subsys/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 start|stop|restart|reload"
        exit 1
esac
exit 0

 

Now run chkconfig oracle for updating the run level information.

Try service oracle start|stop|restart to check that everything works as expected now.

Please goto the url below to get more details/explanation on the script posted above.

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2451893530442

http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php

http://www.linux.com/howtos/Oracle-9i-Fedora-3-Install-HOWTO/sect_08.shtml
0
 
LVL 6

Assisted Solution

by:JJSmith
JJSmith earned 200 total points
ID: 18049903

if you are running from the server box itself then you should not need a listener.

ORACLE_SID=<DBSID>
export ORACLE_SID

sqlplus user/passwd

Cheers
JJ
0
 
LVL 11

Expert Comment

by:mohammadzahid
ID: 18050268
JJSmith is correct. However, if you are planning on using DBA Studio or any other applications from the same machine then listener process will be required.

0
 
LVL 1

Expert Comment

by:Computer101
ID: 20296256
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question