Solved

TNS adapter error, No listener

Posted on 2006-11-30
9
1,071 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
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 76

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
 
LVL 76

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
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 explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now