Solved

TNS adapter error, No listener

Posted on 2006-11-30
9
1,076 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Technology Partners: 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!

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

733 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