[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

TNS adapter error, No listener

Posted on 2006-11-30
9
Medium Priority
?
1,080 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
8 Comments
 
LVL 78

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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
LVL 78

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 800 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 800 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

830 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