Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TNS adapter error, No listener

Posted on 2006-11-30
9
Medium Priority
?
1,079 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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 how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

618 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